Browse the docs

Newsletter

Newsletter in Allpage: its screens, what you can do there and its operations.

Availability. Works when the business has it turned on and its plan includes it. Otherwise its tools answer needs (kind module) with how to turn it on: business.useTool, or a plan that includes it.

What you can do

  • Send a newsletter: the assistant can prepare it and you confirm it, twice
  • Save a newsletter draft: the assistant can do it on its own
  • Delete a newsletter draft: the assistant can do it on its own
  • Preview a newsletter: happens right away
  • Email yourself a test: only you can do it, on its screen
  • Take someone off the newsletter: the assistant can do it on its own

For apps

Tools

  • messaging_broadcast (Send a newsletter): waits for the owner to confirm it in Allpage, whatever they chose for your app
  • messaging_saveDraft (Save a newsletter draft): a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval
  • messaging_deleteDraft (Delete a newsletter draft): a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval
  • messaging_previewBroadcast (Preview a newsletter): runs right away
  • messaging_removeSubscriber (Take someone off the newsletter): a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval

Reads

  • messaging-newsletter_summary (What’s going on)

Only the owner, in Allpage

  • Email yourself a test

Operations

Each one's input and output, as JSON Schema. Ids are typed (typed ids).

messaging-newsletter.summary

What’s going on

Kind
Read
Tool
messaging-newsletter_summary
Scope
messaging-newsletter:read
Reached by
API, MCP

Read-only.

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
Output
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "facts": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "One-line facts, e.g. \"3 bookings today\"."
            },
            "attention": {
              "description": "Things that need the owner, each with a plain reason.",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "happening": {
              "description": "What’s on today, each at its time.",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "at": {
                    "type": "number",
                    "description": "Epoch milliseconds."
                  },
                  "text": {
                    "type": "string"
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "at",
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "metrics": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "value": {
                    "type": "number"
                  },
                  "prior": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "count",
                      "money"
                    ]
                  },
                  "href": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "label",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "title",
            "facts"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "result"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "refused"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "const": "needs"
        },
        "kind": {
          "type": "string",
          "enum": [
            "module",
            "portal",
            "business",
            "limit",
            "paused",
            "reauth"
          ]
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "kind",
        "title",
        "change",
        "message"
      ],
      "additionalProperties": {}
    }
  ]
}

messaging.broadcast

Send a newsletter

Kind
Change
Tool
messaging_broadcast
Scope
messaging:write
Reached by
API, MCP, ChatGPT

waits for the owner to confirm it in Allpage, whatever they chose for your app

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "broadcastId": {
      "type": "string",
      "pattern": "^brc_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "A broadcast id: brc_ and 26 letters and digits."
    },
    "channel": {
      "default": "email",
      "type": "string",
      "enum": [
        "email",
        "sms"
      ]
    },
    "subject": {
      "default": "",
      "type": "string",
      "maxLength": 150
    },
    "body": {
      "default": "",
      "type": "string",
      "maxLength": 5000
    },
    "audienceId": {
      "description": "A segment to send to: an audience from commerce.audiences. Left out, everyone subscribed. Only people who agreed to your emails or texts get it.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^aud_[0-9a-hjkmnp-tv-z]{26}$",
          "description": "A audience id: aud_ and 26 letters and digits."
        },
        {
          "type": "null"
        }
      ]
    },
    "action": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "url": {
          "label": "Link",
          "control": "url",
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "label",
        "url"
      ],
      "additionalProperties": false
    },
    "sendAt": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "minute": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 1439
            },
            {
              "type": "string",
              "pattern": "^\\d{1,2}:\\d{2}$"
            }
          ]
        }
      },
      "required": [
        "date",
        "minute"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

messaging.deleteDraft

Delete a newsletter draft

Kind
Change
Tool
messaging_deleteDraft
Scope
messaging:write
Reached by
API, MCP

a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "broadcastId": {
      "type": "string",
      "pattern": "^brc_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "A broadcast id: brc_ and 26 letters and digits."
    }
  },
  "required": [
    "broadcastId"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

messaging.previewBroadcast

Preview a newsletter

Kind
Change
Tool
messaging_previewBroadcast
Scope
messaging:read
Reached by
API, MCP, ChatGPT

runs right away

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "channel": {
      "default": "email",
      "type": "string",
      "enum": [
        "email",
        "sms"
      ]
    },
    "subject": {
      "default": "",
      "type": "string",
      "maxLength": 150
    },
    "body": {
      "default": "",
      "type": "string",
      "maxLength": 5000
    },
    "audienceId": {
      "description": "A segment to send to: an audience from commerce.audiences. Left out, everyone subscribed. Only people who agreed to your emails or texts get it.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^aud_[0-9a-hjkmnp-tv-z]{26}$",
          "description": "A audience id: aud_ and 26 letters and digits."
        },
        {
          "type": "null"
        }
      ]
    },
    "action": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "url": {
          "label": "Link",
          "control": "url",
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "label",
        "url"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

messaging.removeSubscriber

Take someone off the newsletter

Kind
Change
Tool
messaging_removeSubscriber
Scope
messaging:write
Reached by
API, MCP

a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string",
      "pattern": "^cus_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "A customer id: cus_ and 26 letters and digits."
    },
    "email": {
      "label": "Email",
      "control": "email",
      "type": "string",
      "maxLength": 320
    }
  },
  "required": [
    "customerId"
  ],
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}

messaging.saveDraft

Save a newsletter draft

Kind
Change
Tool
messaging_saveDraft
Scope
messaging:write
Reached by
API, MCP, ChatGPT

a private change: runs now if the owner lets your app make private changes, otherwise waits for their approval

Input
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "broadcastId": {
      "type": "string",
      "pattern": "^brc_[0-9a-hjkmnp-tv-z]{26}$",
      "description": "A broadcast id: brc_ and 26 letters and digits."
    },
    "channel": {
      "default": "email",
      "type": "string",
      "enum": [
        "email",
        "sms"
      ]
    },
    "subject": {
      "default": "",
      "type": "string",
      "maxLength": 150
    },
    "body": {
      "default": "",
      "type": "string",
      "maxLength": 5000
    },
    "audienceId": {
      "description": "A segment to send to: an audience from commerce.audiences. Left out, everyone subscribed. Only people who agreed to your emails or texts get it.",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^aud_[0-9a-hjkmnp-tv-z]{26}$",
          "description": "A audience id: aud_ and 26 letters and digits."
        },
        {
          "type": "null"
        }
      ]
    },
    "action": {
      "type": "object",
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 40
        },
        "url": {
          "label": "Link",
          "control": "url",
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "label",
        "url"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
Output
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "status",
        "title",
        "change"
      ],
      "properties": {
        "status": {
          "const": "done"
        },
        "title": {
          "type": "string"
        },
        "change": {
          "type": "boolean"
        },
        "result": {},
        "undo": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "input": {}
          }
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "proposalId"
      ],
      "properties": {
        "status": {
          "const": "proposed"
        },
        "proposalId": {
          "type": "string"
        },
        "preview": {},
        "approveAt": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "check"
      ],
      "properties": {
        "status": {
          "const": "pending"
        },
        "message": {
          "type": "string"
        },
        "check": {
          "type": "string"
        },
        "checkInput": {
          "type": "object"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "message"
      ],
      "properties": {
        "status": {
          "const": "refused"
        },
        "message": {
          "type": "string"
        },
        "field": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "status",
        "kind",
        "message"
      ],
      "properties": {
        "status": {
          "const": "needs"
        },
        "kind": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      }
    }
  ]
}