Docs
Contents

Message Push API

Unified messaging surface: message providers (email / SMS / push channels), topics and subscribers, creation, modification, and delivery logs of draft and scheduled messages (email / sms / push).

Service and resource boundaries

The Messaging API (/v1/messaging/*) provides unified notification orchestration and delivery auditing across channels (Email, SMS, mobile Push): it supports configuring multi-vendor channel providers (SMTP / SendGrid / Mailgun / Resend, Twilio / Vonage / Telesign / MSG91 / TextMagic, APNs / FCM), selecting recipients via a three-layer addressing model combining Topic, User ID, and device Target, and supports saving drafts (Draft), scheduled sending (scheduledAt), and delivery log tracking.

Resources and Base Paths

Authentication and Permissions

See General conventions for authentication and request header conventions. Scopes for this domain: messages.read / messages.write (messages), providers.read / providers.write (providers), topics.read / topics.write (topics), subscribers.read / subscribers.write (subscribers).

Endpoint overview

The Messaging module contains 46 endpoints in total, grouped by resource into three major groups: message creation (Email / SMS / Push), draft update, deletion, and delivery target/log queries (11); provider-specific creation, update, and management endpoints for 11 upstream providers (Providers) across the three channel types (25); and management endpoints for topics (Topics) and subscribers (Subscribers) (10).

Endpoint List

Messages (messages)

Method + pathPurpose
GET /messaging/messagesList messages
POST /messaging/messages/emailCreate email
PATCH /messaging/messages/email/{messageId}Update email
POST /messaging/messages/smsCreate SMS
PATCH /messaging/messages/sms/{messageId}Update SMS
POST /messaging/messages/pushCreate push notification
PATCH /messaging/messages/push/{messageId}Update push notification
GET /messaging/messages/{messageId}Get message
DELETE /messaging/messages/{messageId}Delete message
GET /messaging/messages/{messageId}/targetsList targets resolved for a message
GET /messaging/messages/{messageId}/logsMessage delivery logs

Providers (providers)

Method + pathPurpose
GET /messaging/providersList providers
POST /messaging/providers/apns|fcmCreate push provider (APNS / FCM)
POST /messaging/providers/mailgun|sendgrid|smtp|resendCreate email provider
POST /messaging/providers/twilio|vonage|telesign|msg91|textmagicCreate SMS provider
PATCH /messaging/providers/{type}/{providerId}Update provider of the corresponding type
GET /messaging/providers/{providerId}Get provider
DELETE /messaging/providers/{providerId}Delete provider
GET /messaging/providers/{providerId}/logsProvider send logs

Topics and subscribers (topics / subscribers)

Method + pathPurpose
GET /messaging/topicsList topics
POST /messaging/topicsCreate topic
GET /messaging/topics/{topicId}Get topic
PATCH /messaging/topics/{topicId}Update topic
DELETE /messaging/topics/{topicId}Delete topic
GET /messaging/topics/{topicId}/logsTopic delivery logs
GET /messaging/topics/{topicId}/subscribersList subscribers
POST /messaging/topics/{topicId}/subscribersCreate subscription
GET /messaging/topics/{topicId}/subscribers/{subscriberId}Get subscription
DELETE /messaging/topics/{topicId}/subscribers/{subscriberId}Unsubscribe
GET /messaging/subscribers/{subscriberId}/logsSubscriber delivery logs

Endpoint details

Requests and Responses

The following sections give the input/output specifications, copyable curl call examples, and response examples for each endpoint. Path prefix /v1; the request headers X-Appwrite-Project: <YOUR_PROJECT_ID> and X-Appwrite-Key: <YOUR_API_KEY> are consistent across all endpoints and are not explained individually in the examples.

Messages

GET /v1/messaging/messages

List all messages in the project with pagination; supports filtering by status, scheduled time, etc., and keyword search (scope messages.read. SDK: Messages.listMessages.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
queriesquerystring[]NoDefault []Array of query strings generated by the SDK's Query constructor (e.g. limit(25), equal("name","x")); supports filtering, sorting, and pagination (limit / cursorAfter / cursorBefore); filterable attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType. Up to 100 items, each at most 4096 characters.
searchquerystringNo—Search term that fuzzily filters list results. Up to 256 characters.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model messageList: total (total number of matches, not calculated when total=false) + messages[] (current page of data).

Key fields of the element model message:

FieldTypeDescription
$idstringMessage ID.
$createdAtstringMessage creation time (ISO 8601).
$updatedAtstringMessage update time (ISO 8601).
providerTypestringMessage channel type (email / sms / push).
topicsstring[]List of topic IDs as recipients.
usersstring[]List of user IDs as recipients.
targetsstring[]List of target IDs as recipients.
scheduledAtstringMessage scheduled send time.
deliveredAtstringMessage actual delivery time.
deliveryErrorsstring[]List of delivery errors (if any).
deliveredTotalintegerNumber of recipients successfully delivered to.
dataobjectMessage data.
statusstringDelivery status.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/messages" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)" \
  --data-urlencode "search=welcome"

Response example:

{
  "total": 5,
  "messages": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "providerType": "email",
      "topics": [
        "announcements"
      ],
      "users": [
        "66b1c2d3e4f5a6b7"
      ],
      "targets": [
        "66c1d2e3f4a5b6c7"
      ],
      "scheduledAt": null,
      "deliveredAt": null,
      "deliveryErrors": [],
      "deliveredTotal": 0,
      "data": {
        "subject": "Welcome to AppBase",
        "content": "Hi there, welcome to AppBase family."
      },
      "status": "draft"
    }
  ]
}

POST /v1/messaging/messages/email

Create an email message: draft=true saves as draft, scheduledAt schedules, otherwise it enters the delivery flow (scope messages.write. SDK: Messages.createEmail.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
messageIdbodystringYes—Message ID. Can be custom, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
subjectbodystringYes—Email subject.
contentbodystringYes—Email body.
topicsbodystring[]No—List of topic IDs.
usersbodystring[]No—List of user IDs.
targetsbodystring[]No—List of target IDs.
ccbodystring[]No—Array of target IDs for CC.
bccbodystring[]No—Array of target IDs for BCC.
attachmentsbodystring[]No—Array of composite IDs for email attachments, in the format <BUCKET_ID>:<FILE_ID> (files must already be uploaded to Storage).
draftbodybooleanNo—Whether it is a draft.
htmlbodybooleanNo—Whether the body is HTML.
scheduledAtbodystringNoCan be nullMessage scheduled send time (ISO 8601). Must be a future time.

Output: 201, model message, fields:

FieldTypeDescription
$idstringMessage ID.
$createdAtstringMessage creation time (ISO 8601).
$updatedAtstringMessage update time (ISO 8601).
providerTypestringMessage channel type (email / sms / push).
topicsstring[]List of topic IDs as recipients.
usersstring[]List of user IDs as recipients.
targetsstring[]List of target IDs as recipients.
scheduledAtstringMessage scheduled send time.
deliveredAtstringMessage actual delivery time.
deliveryErrorsstring[]List of delivery errors (if any).
deliveredTotalintegerNumber of recipients successfully delivered to.
dataobjectMessage data.
statusstringDelivery status.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/messages/email" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "messageId": "welcome-email",
  "subject": "欢迎使用 AppBase",
  "content": "<h1>欢迎注册</h1>",
  "topics": [
    "announcements"
  ],
  "html": true,
  "cc": [
    "66c1d2e3f4a5b6c7"
  ],
  "bcc": [
    "66d1e2f3a4b5c6d7"
  ],
  "attachments": [
    "attachments:66e1f2a3b4c5d6e7"
  ],
  "draft": true
}'

Response excerpt (fields unrelated to this operation omitted):

{
  "$id": "welcome-email",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "providerType": "email",
  "topics": [
    "announcements"
  ],
  "users": [],
  "targets": [],
  "scheduledAt": null,
  "deliveredAt": null,
  "deliveryErrors": [],
  "deliveredTotal": 0,
  "data": {
    "subject": "欢迎使用 AppBase",
    "content": "<h1>欢迎注册</h1>"
  },
  "status": "draft"
}

PATCH /v1/messaging/messages/email/{messageId}

Update an email message: only messages in the draft state can be modified; messages already in processing / sent / failed cannot be modified (scope messages.write. SDK: Messages.updateEmail.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
topicsbodystring[]NoCan be nullList of topic IDs.
usersbodystring[]NoCan be nullList of user IDs.
targetsbodystring[]NoCan be nullList of target IDs.
subjectbodystringNoCan be nullEmail subject.
contentbodystringNoCan be nullEmail body.
draftbodybooleanNoCan be nullWhether it is a draft.
htmlbodybooleanNoCan be nullWhether the body is HTML.
ccbodystring[]NoCan be nullArray of target IDs for CC.
bccbodystring[]NoCan be nullArray of target IDs for BCC.
scheduledAtbodystringNoCan be nullMessage scheduled send time (ISO 8601). Must be a future time.
attachmentsbodystring[]NoCan be nullArray of composite IDs for email attachments, in the format <BUCKET_ID>:<FILE_ID> (files must already be uploaded to Storage).
messageIdpathstringYes—Message ID.

Output: 200, model message (full fields described above), key fields:

FieldTypeDescription
$idstringMessage ID.
$createdAtstringMessage creation time (ISO 8601).
$updatedAtstringMessage update time (ISO 8601).
providerTypestringMessage channel type (email / sms / push).
topicsstring[]List of topic IDs as recipients.
usersstring[]List of user IDs as recipients.
targetsstring[]List of target IDs as recipients.
scheduledAtstringMessage scheduled send time.
deliveredAtstringMessage actual delivery time.
deliveryErrorsstring[]List of delivery errors (if any).
deliveredTotalintegerNumber of recipients successfully delivered to.
dataobjectMessage data.
statusstringDelivery status.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/messages/email/<MESSAGE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "subject": "欢迎使用 AppBase",
  "content": "<h1>欢迎注册</h1>",
  "html": true
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "providerType": "email",
  "topics": [
    "announcements"
  ],
  "users": [
    "66b1c2d3e4f5a6b7"
  ],
  "targets": [
    "66c1d2e3f4a5b6c7"
  ],
  "scheduledAt": null,
  "deliveredAt": null,
  "deliveryErrors": [],
  "deliveredTotal": 0,
  "data": {
    "subject": "Welcome to AppBase",
    "content": "Hi there, welcome to AppBase family."
  },
  "status": "draft"
}

POST /v1/messaging/messages/sms

Create an SMS message. This endpoint is marked as deprecated in the spec (still available in v2.6.0, and the SDK retains the corresponding method). (Scope messages.write. SDK: Messages.createSms.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
messageIdbodystringYes—Message ID. Can be custom, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
contentbodystringYes—SMS body.
topicsbodystring[]No—List of topic IDs.
usersbodystring[]No—List of user IDs.
targetsbodystring[]No—List of target IDs.
draftbodybooleanNo—Whether it is a draft.
scheduledAtbodystringNoCan be nullMessage scheduled send time (ISO 8601). Must be a future time.

Output: 201, model message (full fields described above), key fields:

FieldTypeDescription
$idstringMessage ID.
$createdAtstringMessage creation time (ISO 8601).
$updatedAtstringMessage update time (ISO 8601).
providerTypestringMessage channel type (email / sms / push).
topicsstring[]List of topic IDs as recipients.
usersstring[]List of user IDs as recipients.
targetsstring[]List of target IDs as recipients.
scheduledAtstringMessage scheduled send time.
deliveredAtstringMessage actual delivery time.
deliveryErrorsstring[]List of delivery errors (if any).
deliveredTotalintegerNumber of recipients successfully delivered to.
dataobjectMessage data.
statusstringDelivery status.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/messages/sms" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "messageId": "notification-sms",
  "content": "Welcome to Agentbase",
  "topics": [
    "announcements"
  ],
  "users": [
    "66b1c2d3e4f5a6b7"
  ],
  "draft": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "notification-sms",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "providerType": "sms",
  "topics": [
    "announcements"
  ],
  "users": [
    "66b1c2d3e4f5a6b7"
  ],
  "targets": [],
  "scheduledAt": null,
  "deliveredAt": null,
  "deliveryErrors": [],
  "deliveredTotal": 0,
  "status": "draft"
}

PATCH /v1/messaging/messages/sms/{messageId}

Update an SMS message: only messages in the draft state can be modified. This endpoint is marked as deprecated in the spec (still available in v2.6.0, and the SDK retains the corresponding method). (Scope messages.write. SDK: Messages.updateSms.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
topicsbodystring[]NoCan be nullList of topic IDs.
usersbodystring[]NoCan be nullList of user IDs.
targetsbodystring[]NoCan be nullList of target IDs.
contentbodystringNoCan be nullEmail body.
draftbodybooleanNoCan be nullWhether it is a draft.
scheduledAtbodystringNoCan be nullMessage scheduled send time (ISO 8601). Must be a future time.
messageIdpathstringYes—Message ID.

Output: 200, model message (full fields described above), key fields:

FieldTypeDescription
$idstringMessage ID.
$createdAtstringMessage creation time (ISO 8601).
$updatedAtstringMessage update time (ISO 8601).
providerTypestringMessage channel type (email / sms / push).
topicsstring[]List of topic IDs as recipients.
usersstring[]List of user IDs as recipients.
targetsstring[]List of target IDs as recipients.
scheduledAtstringMessage scheduled send time.
deliveredAtstringMessage actual delivery time.
deliveryErrorsstring[]List of delivery errors (if any).
deliveredTotalintegerNumber of recipients successfully delivered to.
dataobjectMessage data.
statusstringDelivery status.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/messages/sms/<MESSAGE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "content": "<h1>欢迎注册</h1>"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "providerType": "sms",
  "topics": [
    "announcements"
  ],
  "users": [
    "66b1c2d3e4f5a6b7"
  ],
  "targets": [
    "66c1d2e3f4a5b6c7"
  ],
  "scheduledAt": null,
  "deliveredAt": null,
  "deliveryErrors": [],
  "deliveredTotal": 0,
  "status": "draft"
}

POST /v1/messaging/messages/push

Create a push notification: content fields take effect per Android / iOS / Web platform respectively (scope messages.write. SDK: Messages.createPush.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
messageIdbodystringYes—Message ID. Can be custom, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
titlebodystringNo—Push title.
bodybodystringNo—Push body.
topicsbodystring[]No—List of topic IDs.
usersbodystring[]No—List of user IDs.
targetsbodystring[]No—List of target IDs.
databodyobjectNoCan be nullPush custom key-value data.
actionbodystringNo—Push click action.
imagebodystringNo—Push large image. Must be the composite ID of a jpeg/png image in Storage, in the format <BUCKET_ID>:<FILE_ID>.
iconbodystringNo—Push icon. Only effective on Android / Web.
soundbodystringNo—Push sound. Only effective on Android / iOS.
colorbodystringNo—Push color. Only effective on Android.
tagbodystringNo—Push tag (collapses notifications with the same tag). Only effective on Android.
badgebodyintegerNo—App badge count. Only effective on iOS.
draftbodybooleanNo—Whether it is a draft.
scheduledAtbodystringNoCan be nullMessage scheduled send time (ISO 8601). Must be a future time.
contentAvailablebodybooleanNo—Delivers silently in the background when set to true. Only effective on iOS.
criticalbodybooleanNo—Marks the notification as critical when set to true, requiring the app to have the critical notification entitlement. Only effective on iOS.
prioritybodystringNonormal / highPush priority. normal takes device status into account and delivery may be delayed; high always attempts immediate delivery.
imageInternalbodybooleanNo—true when the image is stored in the internal default bucket.

Output: 201, model message (full fields described above), key fields:

FieldTypeDescription
$idstringMessage ID.
$createdAtstringMessage creation time (ISO 8601).
$updatedAtstringMessage update time (ISO 8601).
providerTypestringMessage channel type (email / sms / push).
topicsstring[]List of topic IDs as recipients.
usersstring[]List of user IDs as recipients.
targetsstring[]List of target IDs as recipients.
scheduledAtstringMessage scheduled send time.
deliveredAtstringMessage actual delivery time.
deliveryErrorsstring[]List of delivery errors (if any).
deliveredTotalintegerNumber of recipients successfully delivered to.
dataobjectMessage data.
statusstringDelivery status.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/messages/push" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "messageId": "notification-push",
  "topics": [
    "announcements"
  ],
  "data": {
    "orderId": "1024"
  },
  "action": "open-orders",
  "priority": "high",
  "draft": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "notification-push",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "providerType": "push",
  "topics": [
    "announcements"
  ],
  "users": [],
  "targets": [],
  "scheduledAt": null,
  "deliveredAt": null,
  "deliveryErrors": [],
  "deliveredTotal": 0,
  "status": "draft"
}

PATCH /v1/messaging/messages/push/{messageId}

Update push notification: only changeable in draft status (scope messages.write. SDK: Messages.updatePush.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
topicsbodystring[]NoCan be nullList of topic IDs.
usersbodystring[]NoCan be nullList of user IDs.
targetsbodystring[]NoCan be nullList of target IDs.
titlebodystringNoCan be nullPush title.
bodybodystringNoCan be nullPush body.
databodyobjectNoCan be nullPush additional data.
actionbodystringNoCan be nullPush click action.
imagebodystringNoCan be nullPush large image. Must be the composite ID of a jpeg/png image in Storage, in the format <BUCKET_ID>:<FILE_ID>.
iconbodystringNoCan be nullPush icon. Only effective on Android / Web.
soundbodystringNoCan be nullPush sound. Only effective on Android / iOS.
colorbodystringNoCan be nullPush color. Only effective on Android.
tagbodystringNoCan be nullPush tag (collapses notifications with the same tag). Only effective on Android.
badgebodyintegerNoCan be nullApp badge count. Only effective on iOS.
draftbodybooleanNoCan be nullWhether it is a draft.
scheduledAtbodystringNoCan be nullMessage scheduled send time (ISO 8601). Must be a future time.
contentAvailablebodybooleanNoCan be nullDelivers silently in the background when set to true. Only effective on iOS.
criticalbodybooleanNoCan be nullMarks the notification as critical when set to true, requiring the app to have the critical notification entitlement. Only effective on iOS.
prioritybodystringNonormal / high; can be nullPush priority. normal takes device battery status into account and sending may be delayed; high always attempts immediate delivery.
imageInternalbodybooleanNo—true when the image is stored in the internal default bucket.
messageIdpathstringYes—Message ID.

Output: 200, model message (full fields described above), key fields:

FieldTypeDescription
$idstringMessage ID.
$createdAtstringMessage creation time (ISO 8601).
$updatedAtstringMessage update time (ISO 8601).
providerTypestringMessage channel type (email / sms / push).
topicsstring[]List of topic IDs as recipients.
usersstring[]List of user IDs as recipients.
targetsstring[]List of target IDs as recipients.
scheduledAtstringMessage scheduled send time.
deliveredAtstringMessage actual delivery time.
deliveryErrorsstring[]List of delivery errors (if any).
deliveredTotalintegerNumber of recipients successfully delivered to.
dataobjectMessage data.
statusstringDelivery status.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/messages/push/<MESSAGE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "订单已发货",
  "body": "{\"now\": true}"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "providerType": "push",
  "topics": [
    "announcements"
  ],
  "users": [
    "66b1c2d3e4f5a6b7"
  ],
  "targets": [
    "66c1d2e3f4a5b6c7"
  ],
  "scheduledAt": null,
  "deliveredAt": null,
  "deliveryErrors": [],
  "deliveredTotal": 0,
  "status": "draft"
}

GET /v1/messaging/messages/{messageId}

Read a single message and its delivery status (status, deliveredTotal, deliveryErrors) (scope messages.read. SDK: Messages.getMessage.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
messageIdpathstringYes—Message ID.

Output: 200, model message (full fields described above), key fields:

FieldTypeDescription
$idstringMessage ID.
$createdAtstringMessage creation time (ISO 8601).
$updatedAtstringMessage update time (ISO 8601).
providerTypestringMessage channel type (email / sms / push).
topicsstring[]List of topic IDs as recipients.
usersstring[]List of user IDs as recipients.
targetsstring[]List of target IDs as recipients.
scheduledAtstringMessage scheduled send time.
deliveredAtstringMessage actual delivery time.
deliveryErrorsstring[]List of delivery errors (if any).
deliveredTotalintegerNumber of recipients successfully delivered to.
dataobjectMessage data.
statusstringDelivery status.

Call example:

curl "https://<your-endpoint>/v1/messaging/messages/<MESSAGE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "providerType": "email",
  "topics": [
    "announcements"
  ],
  "users": [
    "66b1c2d3e4f5a6b7"
  ],
  "targets": [
    "66c1d2e3f4a5b6c7"
  ],
  "scheduledAt": null,
  "deliveredAt": null,
  "deliveryErrors": [],
  "deliveredTotal": 0,
  "data": {
    "subject": "Welcome to AppBase",
    "content": "Hi there, welcome to AppBase family."
  },
  "status": "draft"
}

DELETE /v1/messaging/messages/{messageId}

Delete message: sent messages are not recalled, only the record is deleted; drafts/scheduled messages have their delivery canceled (scope messages.write. SDK: Messages.delete.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
messageIdpathstringYes—Message ID.

Output: 204 No response body.

Call example:

curl -X DELETE "https://<your-endpoint>/v1/messaging/messages/<MESSAGE_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

_Binary stream or no response body (see output description)._

GET /v1/messaging/messages/{messageId}/targets

List the delivery targets explicitly specified in the message targets; topics and users are not expanded, and an empty targets list returns no targets (scope messages.read. SDK: Messages.listTargets.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
messageIdpathstringYes—Message ID.
queriesquerystring[]NoDefaults to []Array of query strings, generated by the SDK's Query constructor (in the form of limit(25), equal("name","x")); supports filtering, sorting, and pagination (limit / cursorAfter / cursorBefore); filterable attributes: userId, providerId, identifier, providerType. At most 100 queries, each at most 4096 characters.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model targetList: total (total number of matches, not calculated when total=false) + targets[] (current page of data).

Key fields of the element model target:

FieldTypeDescription
$idstringTarget ID.
$createdAtstringTarget creation time (ISO 8601).
$updatedAtstringTarget update time (ISO 8601).
namestringTarget name.
userIdstringUser ID.
providerTypestringTarget channel type: email / sms / push.
identifierstringTarget identifier (email address / phone number / push token).
expiredbooleanWhether the target has expired.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/messages/<MESSAGE_ID>/targets" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)"

Response example:

{
  "total": 1,
  "targets": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "name": "Apple iPhone 12",
      "userId": "259125845563242502",
      "providerId": "259125845563242502",
      "providerType": "push",
      "identifier": "token",
      "expired": false
    }
  ]
}

GET /v1/messaging/messages/{messageId}/logs

List the delivery logs of the message (only limit/offset pagination is supported) (scope messages.read. SDK: Logs.listMessageLogs.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
messageIdpathstringYes—Message ID.
queriesquerystring[]NoDefaults to []Array of query strings, generated by the SDK's Query constructor (in the form of limit(25), equal("name","x")); only the limit / offset methods are supported.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model logList: total (total number of matches, not calculated when total=false) + logs[] (current page of data).

Key fields of the element model log:

FieldTypeDescription
eventstringEvent name.
userIdstringID of the user who triggered this log. When impersonation is used, the impersonator is recorded rather than the impersonated user.
userEmailstringEmail of the user who triggered this log.
modestringAPI mode when the event was triggered (admin/key, etc.).
ipstringSource IP when the event occurred.
timestringLog creation time (ISO 8601).
clientNamestringClient name.
countryNamestringCountry/region name.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/messages/<MESSAGE_ID>/logs" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)"

Response example:

{
  "total": 5,
  "logs": ""
}

Providers

GET /v1/messaging/providers

List all messaging providers in the project with pagination (scope providers.read. SDK: Providers.listProviders.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
queriesquerystring[]NoDefaults to []Array of query strings, generated by the SDK's Query constructor (in the form of limit(25), equal("name","x")); supports filtering, sorting, and pagination (limit / cursorAfter / cursorBefore); filterable attributes: name, provider, type, enabled. At most 100 queries, each at most 4096 characters.
searchquerystringNo—Search term that fuzzily filters list results. Up to 256 characters.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model providerList: total (total number of matches, not calculated when total=false) + providers[] (current page of data).

Key fields of the element model provider:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/providers" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)" \
  --data-urlencode "search=welcome"

Response excerpt:

{
  "total": 5,
  "providers": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "name": "Mailgun",
      "provider": "mailgun",
      "enabled": true,
      "type": "email"
    }
  ]
}

POST /v1/messaging/providers/apns

Create an Apple Push Notification service (APNS) provider: uses the trio of .p8 key credentials (authKey/authKeyId/teamId). This endpoint is marked as deprecated in the spec (still available in v2.6.0; the SDK keeps the corresponding method). (scope providers.write. SDK: Providers.createApnsProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
authKeybodystringNo—APNS authentication key (.p8 private key content).
authKeyIdbodystringNo—APNS key ID.
teamIdbodystringNo—APNS team ID.
bundleIdbodystringNo—App Bundle ID.
sandboxbodybooleanNo—Whether to use the APNS sandbox environment.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider, fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/apns" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "apns-main",
  "name": "APNS",
  "authKey": "-----BEGIN PRIVATE KEY-----\\nMIGT...\\n-----END PRIVATE KEY-----",
  "authKeyId": "ABC123DEFG",
  "teamId": "TEAMID12345",
  "bundleId": "com.example.app",
  "sandbox": false,
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "apns-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "APNS",
  "provider": "apns",
  "enabled": true,
  "type": "push"
}

PATCH /v1/messaging/providers/apns/{providerId}

Update APNS provider: fields not provided keep their current values. This endpoint is marked as deprecated in the spec (still available in v2.6.0; the SDK keeps the corresponding method). (scope providers.write. SDK: Providers.updateApnsProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
authKeybodystringNo—APNS authentication key (.p8 private key content).
authKeyIdbodystringNo—APNS key ID.
teamIdbodystringNo—APNS team ID.
bundleIdbodystringNo—App Bundle ID.
sandboxbodybooleanNoCan be nullWhether to use the APNS sandbox environment.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/apns/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "APNS",
  "enabled": true,
  "authKey": "-----BEGIN PRIVATE KEY-----\\nMIGT...\\n-----END PRIVATE KEY-----",
  "authKeyId": "ABC123DEFG",
  "teamId": "TEAMID12345",
  "bundleId": "com.example.app",
  "sandbox": false
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "APNS",
  "provider": "apns",
  "enabled": true,
  "type": "push"
}

POST /v1/messaging/providers/fcm

Create a Firebase Cloud Messaging (FCM) provider: submit the service account JSON. This endpoint is marked as deprecated in the spec (still available in v2.6.0; the SDK keeps the corresponding method). (scope providers.write. SDK: Providers.createFcmProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
serviceAccountJSONbodyobjectNoCan be nullFCM service account JSON.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/fcm" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "fcm-main",
  "name": "FCM",
  "serviceAccountJSON": {
    "type": "service_account",
    "project_id": "my-project"
  },
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "fcm-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "FCM",
  "provider": "fcm",
  "enabled": true,
  "type": "push"
}

PATCH /v1/messaging/providers/fcm/{providerId}

Update FCM provider. This endpoint is marked as deprecated in the spec (still available in v2.6.0; the SDK keeps the corresponding method). (scope providers.write. SDK: Providers.updateFcmProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
serviceAccountJSONbodyobjectNoCan be nullFCM service account JSON.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/fcm/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "FCM",
  "enabled": true,
  "serviceAccountJSON": {
    "type": "service_account",
    "project_id": "my-project"
  }
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "FCM",
  "provider": "fcm",
  "enabled": true,
  "type": "push"
}

POST /v1/messaging/providers/mailgun

Create a Mailgun email provider (scope providers.write. SDK: Providers.createMailgunProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
apiKeybodystringNo—Mailgun API Key.
domainbodystringNo—Mailgun domain.
isEuRegionbodybooleanNoCan be nullWhether to use the Mailgun EU region.
fromNamebodystringNo—Sender name.
fromEmailbodystringNo—Sender email address.
replyToNamebodystringNo—Email Reply-To name. Defaults to the sender name; must be provided together with the Reply-To email address.
replyToEmailbodystringNo—Email Reply-To address. Defaults to the sender email address; must be provided together with the Reply-To name.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/mailgun" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "mailgun-main",
  "name": "MAILGUN",
  "apiKey": "key-1234567890abcdef",
  "domain": "mg.example.com",
  "isEuRegion": false,
  "fromName": "AppBase",
  "fromEmail": "noreply@example.com",
  "replyToName": "支持团队",
  "replyToEmail": "support@example.com",
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "mailgun-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "MAILGUN",
  "provider": "mailgun",
  "enabled": true,
  "type": "email"
}

PATCH /v1/messaging/providers/mailgun/{providerId}

Update Mailgun provider (scope providers.write. SDK: Providers.updateMailgunProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
apiKeybodystringNo—Mailgun API Key.
domainbodystringNo—Mailgun domain.
isEuRegionbodybooleanNoCan be nullWhether to use the Mailgun EU region.
enabledbodybooleanNoCan be nullWhether enabled.
fromNamebodystringNo—Sender name.
fromEmailbodystringNo—Sender email address.
replyToNamebodystringNo—Email Reply-To name. Defaults to the sender name.
replyToEmailbodystringNo—Email Reply-To address. Defaults to the sender email address.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/mailgun/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "MAILGUN",
  "apiKey": "key-1234567890abcdef",
  "domain": "mg.example.com",
  "isEuRegion": false,
  "enabled": true,
  "fromName": "AppBase",
  "fromEmail": "noreply@example.com",
  "replyToName": "支持团队",
  "replyToEmail": "support@example.com"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "MAILGUN",
  "provider": "mailgun",
  "enabled": true,
  "type": "email"
}

POST /v1/messaging/providers/msg91

Create MSG91 SMS provider (scope providers.write. SDK: Providers.createMsg91Provider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
templateIdbodystringNo—MSG91 template ID.
senderIdbodystringNo—MSG91 sender ID.
authKeybodystringNo—MSG91 auth secret.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/msg91" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "msg91-main",
  "name": "MSG91",
  "templateId": "6789abcdef012345",
  "senderId": "APPBASE",
  "authKey": "-----BEGIN PRIVATE KEY-----\\nMIGT...\\n-----END PRIVATE KEY-----",
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "msg91-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "MSG91",
  "provider": "msg91",
  "enabled": true,
  "type": "sms"
}

PATCH /v1/messaging/providers/msg91/{providerId}

Update MSG91 provider (scope providers.write. SDK: Providers.updateMsg91Provider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
templateIdbodystringNo—MSG91 template ID.
senderIdbodystringNo—MSG91 sender ID.
authKeybodystringNo—MSG91 auth secret.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/msg91/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "MSG91",
  "enabled": true,
  "templateId": "6789abcdef012345",
  "senderId": "APPBASE",
  "authKey": "-----BEGIN PRIVATE KEY-----\\nMIGT...\\n-----END PRIVATE KEY-----"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "MSG91",
  "provider": "msg91",
  "enabled": true,
  "type": "sms"
}

POST /v1/messaging/providers/resend

Create Resend email provider (scope providers.write. SDK: Providers.createResendProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
apiKeybodystringNo—Resend API key.
fromNamebodystringNo—Sender name.
fromEmailbodystringNo—Sender email address.
replyToNamebodystringNo—Email Reply-To name. Defaults to the sender name.
replyToEmailbodystringNo—Email Reply-To address. Defaults to the sender email address.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/resend" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "resend-main",
  "name": "RESEND",
  "apiKey": "key-1234567890abcdef",
  "fromName": "AppBase",
  "fromEmail": "noreply@example.com",
  "replyToName": "支持团队",
  "replyToEmail": "support@example.com",
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "resend-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "RESEND",
  "provider": "resend",
  "enabled": true,
  "type": "email"
}

PATCH /v1/messaging/providers/resend/{providerId}

Update Resend provider (scope providers.write. SDK: Providers.updateResendProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
apiKeybodystringNo—Resend API key.
fromNamebodystringNo—Sender name.
fromEmailbodystringNo—Sender email address.
replyToNamebodystringNo—Email Reply-To name. Defaults to the sender name.
replyToEmailbodystringNo—Email Reply-To address. Defaults to the sender email address.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/resend/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "RESEND",
  "enabled": true,
  "apiKey": "key-1234567890abcdef",
  "fromName": "AppBase",
  "fromEmail": "noreply@example.com",
  "replyToName": "支持团队",
  "replyToEmail": "support@example.com"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "RESEND",
  "provider": "resend",
  "enabled": true,
  "type": "email"
}

POST /v1/messaging/providers/sendgrid

Create SendGrid email provider (scope providers.write. SDK: Providers.createSendgridProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
apiKeybodystringNo—SendGrid API key.
fromNamebodystringNo—Sender name.
fromEmailbodystringNo—Sender email address.
replyToNamebodystringNo—Email Reply-To name. Defaults to the sender name.
replyToEmailbodystringNo—Email Reply-To address. Defaults to the sender email address.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/sendgrid" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "sendgrid-main",
  "name": "SENDGRID",
  "apiKey": "key-1234567890abcdef",
  "fromName": "AppBase",
  "fromEmail": "noreply@example.com",
  "replyToName": "支持团队",
  "replyToEmail": "support@example.com",
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "sendgrid-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "SENDGRID",
  "provider": "sendgrid",
  "enabled": true,
  "type": "email"
}

PATCH /v1/messaging/providers/sendgrid/{providerId}

Update SendGrid provider (scope providers.write. SDK: Providers.updateSendgridProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
apiKeybodystringNo—SendGrid API key.
fromNamebodystringNo—Sender name.
fromEmailbodystringNo—Sender email address.
replyToNamebodystringNo—Email Reply-To name. Defaults to the sender name.
replyToEmailbodystringNo—Email Reply-To address. Defaults to the sender email address.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/sendgrid/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "SENDGRID",
  "enabled": true,
  "apiKey": "key-1234567890abcdef",
  "fromName": "AppBase",
  "fromEmail": "noreply@example.com",
  "replyToName": "支持团队",
  "replyToEmail": "support@example.com"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "SENDGRID",
  "provider": "sendgrid",
  "enabled": true,
  "type": "email"
}

POST /v1/messaging/providers/smtp

Create a generic SMTP email provider: host, port, encryption method, and auth credentials. This endpoint is marked as deprecated in the spec (still available in v2.6.0; the SDK keeps the corresponding method). (Scope providers.write. SDK: Providers.createSmtpProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
hostbodystringYes—SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as smtp1.example.com:25;smtp2.example.com. You can also specify encryption type, for example: tls://smtp1.example.com:587;ssl://smtp2.example.com:465". Hosts will be tried in order.
portbodyintegerNo—SMTP port.
usernamebodystringNo—Auth username.
passwordbodystringNo—Auth password.
encryptionbodystringNonone / ssl / tlsEncryption method: none (no encryption) / ssl / tls.
autoTLSbodybooleanNo—Whether to enable SMTP AutoTLS.
mailerbodystringNo—Value of the X-Mailer header.
fromNamebodystringNo—Sender name.
fromEmailbodystringNo—Sender email address.
replyToNamebodystringNo—Email Reply-To name. Defaults to the sender name.
replyToEmailbodystringNo—Email Reply-To address. Defaults to the sender email address.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/smtp" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "smtp-main",
  "name": "SMTP",
  "host": "smtp.example.com",
  "port": 587,
  "username": "postmaster@example.com",
  "password": "smtp-password",
  "encryption": "none",
  "autoTLS": true,
  "mailer": "AppBase",
  "fromName": "AppBase"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "smtp-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "SMTP",
  "provider": "smtp",
  "enabled": true,
  "type": "email"
}

PATCH /v1/messaging/providers/smtp/{providerId}

Update SMTP provider. This endpoint is marked as deprecated in the spec (still available in v2.6.0; the SDK keeps the corresponding method). (Scope providers.write. SDK: Providers.updateSmtpProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
hostbodystringNo—SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as smtp1.example.com:25;smtp2.example.com. You can also specify encryption type, for example: tls://smtp1.example.com:587;ssl://smtp2.example.com:465". Hosts will be tried in order.
portbodyintegerNoCan be nullSMTP port.
usernamebodystringNo—Auth username.
passwordbodystringNo—Auth password.
encryptionbodystringNonone / ssl / tlsEncryption method: ssl / tls.
autoTLSbodybooleanNoCan be nullWhether to enable SMTP AutoTLS.
mailerbodystringNo—Value of the X-Mailer header.
fromNamebodystringNo—Sender name.
fromEmailbodystringNo—Sender email address.
replyToNamebodystringNo—Email Reply-To name. Defaults to the sender name.
replyToEmailbodystringNo—Email Reply-To address. Defaults to the sender email address.
enabledbodybooleanNoCan be nullWhether enabled.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/smtp/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "SMTP",
  "host": "smtp.example.com",
  "port": 587,
  "username": "postmaster@example.com",
  "password": "smtp-password",
  "encryption": "none",
  "autoTLS": true,
  "mailer": "AppBase",
  "fromName": "AppBase",
  "fromEmail": "noreply@example.com"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "SMTP",
  "provider": "smtp",
  "enabled": true,
  "type": "email"
}

POST /v1/messaging/providers/telesign

Create Telesign SMS provider (scope providers.write. SDK: Providers.createTelesignProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
frombodystringNo—Sender phone number, must be an + prefix with country code, e.g. +16175551212.
customerIdbodystringNo—Telesign customer ID.
apiKeybodystringNo—Telesign API key.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/telesign" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "telesign-main",
  "name": "TELESIGN",
  "from": "+16175551212",
  "customerId": "FFFFFFFF-1111-2222-3333-444444444444",
  "apiKey": "key-1234567890abcdef",
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "telesign-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "TELESIGN",
  "provider": "telesign",
  "enabled": true,
  "type": "sms"
}

PATCH /v1/messaging/providers/telesign/{providerId}

Update Telesign provider (scope providers.write. SDK: Providers.updateTelesignProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
customerIdbodystringNo—Telesign customer ID.
apiKeybodystringNo—Telesign API key.
frombodystringNo—Sender phone number.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/telesign/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "TELESIGN",
  "enabled": true,
  "customerId": "FFFFFFFF-1111-2222-3333-444444444444",
  "apiKey": "key-1234567890abcdef",
  "from": "+16175551212"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "TELESIGN",
  "provider": "telesign",
  "enabled": true,
  "type": "sms"
}

POST /v1/messaging/providers/textmagic

Create Textmagic SMS provider (scope providers.write. SDK: Providers.createTextmagicProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
frombodystringNo—Sender phone number, must be an + prefix with country code, e.g. +16175551212.
usernamebodystringNo—Textmagic username.
apiKeybodystringNo—Textmagic API key.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/textmagic" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "textmagic-main",
  "name": "TEXTMAGIC",
  "from": "+16175551212",
  "username": "postmaster@example.com",
  "apiKey": "key-1234567890abcdef",
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "textmagic-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "TEXTMAGIC",
  "provider": "textmagic",
  "enabled": true,
  "type": "sms"
}

PATCH /v1/messaging/providers/textmagic/{providerId}

Update Textmagic provider (scope providers.write. SDK: Providers.updateTextmagicProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
usernamebodystringNo—Textmagic username.
apiKeybodystringNo—Textmagic API key.
frombodystringNo—Sender phone number.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/textmagic/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "TEXTMAGIC",
  "enabled": true,
  "username": "postmaster@example.com",
  "apiKey": "key-1234567890abcdef",
  "from": "+16175551212"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "TEXTMAGIC",
  "provider": "textmagic",
  "enabled": true,
  "type": "sms"
}

POST /v1/messaging/providers/twilio

Create Twilio SMS provider (scope providers.write. SDK: Providers.createTwilioProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
frombodystringNo—Sender phone number, must be an + prefix with country code, e.g. +16175551212.
accountSidbodystringNo—Twilio Account SID.
authTokenbodystringNo—Twilio Auth Token.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/twilio" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "twilio-main",
  "name": "TWILIO",
  "from": "+16175551212",
  "accountSid": "ACb1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f",
  "authToken": "authtoken1234567890abcdef",
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "twilio-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "TWILIO",
  "provider": "twilio",
  "enabled": true,
  "type": "sms"
}

PATCH /v1/messaging/providers/twilio/{providerId}

Update Twilio provider (scope providers.write. SDK: Providers.updateTwilioProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
accountSidbodystringNo—Twilio Account SID.
authTokenbodystringNo—Twilio Auth Token.
frombodystringNo—Sender phone number.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/twilio/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "TWILIO",
  "enabled": true,
  "accountSid": "ACb1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f",
  "authToken": "authtoken1234567890abcdef",
  "from": "+16175551212"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "TWILIO",
  "provider": "twilio",
  "enabled": true,
  "type": "sms"
}

POST /v1/messaging/providers/vonage

Create Vonage SMS provider (scope providers.write. SDK: Providers.createVonageProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
providerIdbodystringYes—Provider ID. Can be customized, or generated with the SDK's ID.unique(); only a-z, A-Z, 0-9, periods, hyphens, and underscores are allowed, and it cannot start with a special character. At most 36 characters.
namebodystringYes—Provider name.
frombodystringNo—Sender phone number, must be an + prefix with country code, e.g. +16175551212.
apiKeybodystringNo—Vonage API key.
apiSecretbodystringNo—Vonage API secret.
enabledbodybooleanNoCan be nullWhether enabled.

Output: 201, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/providers/vonage" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "providerId": "vonage-main",
  "name": "VONAGE",
  "from": "+16175551212",
  "apiKey": "key-1234567890abcdef",
  "apiSecret": "apisecret1234567890abcdef",
  "enabled": true
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "vonage-main",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "VONAGE",
  "provider": "vonage",
  "enabled": true,
  "type": "sms"
}

PATCH /v1/messaging/providers/vonage/{providerId}

Update Vonage provider (scope providers.write. SDK: Providers.updateVonageProvider.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNo—Provider name.
enabledbodybooleanNoCan be nullWhether enabled.
apiKeybodystringNo—Vonage API key.
apiSecretbodystringNo—Vonage API secret.
frombodystringNo—Sender phone number.
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/providers/vonage/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "VONAGE",
  "enabled": true,
  "apiKey": "key-1234567890abcdef",
  "apiSecret": "apisecret1234567890abcdef",
  "from": "+16175551212"
}'

Response excerpt (unrelated fields omitted):

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "VONAGE",
  "provider": "vonage",
  "enabled": true,
  "type": "sms"
}

GET /v1/messaging/providers/{providerId}

Read provider details by ID; responses may contain sensitive configuration and must be protected (scope providers.read. SDK: Providers.getProvider.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
providerIdpathstringYes—Provider ID.

Output: 200, model provider (full fields described above), key fields:

FieldTypeDescription
$idstringProvider ID.
$createdAtstringProvider creation time (ISO 8601).
$updatedAtstringProvider update time (ISO 8601).
namestringProvider instance name.
providerstringProvider service identifier.
enabledbooleanWhether the provider is enabled.
typestringProvider channel type.
credentialsobjectProvider credentials; fields and response content vary by provider and deployment.
optionsobjectProvider options.

Call example:

curl "https://<your-endpoint>/v1/messaging/providers/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response excerpt:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "Mailgun",
  "provider": "mailgun",
  "enabled": true,
  "type": "email"
}

DELETE /v1/messaging/providers/{providerId}

Delete provider: unsent messages will fail delivery due to the lack of an available provider (scope providers.write. SDK: Providers.deleteProvider.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
providerIdpathstringYes—Provider ID.

Output: 204 No response body.

Call example:

curl -X DELETE "https://<your-endpoint>/v1/messaging/providers/<PROVIDER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

_Binary stream or no response body (see output description)._

GET /v1/messaging/providers/{providerId}/logs

List delivery logs for this provider (only limit/offset pagination is supported) (scope providers.read. SDK: Providers.listProviderLogs.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
providerIdpathstringYes—Provider ID.
queriesquerystring[]NoDefaults to []Array of query strings, generated by the SDK's Query constructor (in the form of limit(25), equal("name","x")); only the limit / offset methods are supported.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model logList: total (total number of matches, not calculated when total=false) + logs[] (current page of data).

Key fields of the element model log:

FieldTypeDescription
eventstringEvent name.
userIdstringID of the user who triggered this log. When impersonation is used, the impersonator is recorded rather than the impersonated user.
userEmailstringEmail of the user who triggered this log.
modestringAPI mode when the event was triggered (admin/key, etc.).
ipstringSource IP when the event occurred.
timestringLog creation time (ISO 8601).
clientNamestringClient name.
countryNamestringCountry/region name.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/providers/<PROVIDER_ID>/logs" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)"

Response example:

{
  "total": 5,
  "logs": ""
}

Topics and Subscribers

GET /v1/messaging/topics

List all topics in the project with pagination (scope topics.read. SDK: Topics.listTopics.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
queriesquerystring[]NoDefault []Array of query strings generated by the SDK's Query constructor (e.g. limit(25), equal("name","x")); supports filtering, sorting, and pagination (limit / cursorAfter / cursorBefore); filterable attributes: name, description, emailTotal, smsTotal, pushTotal. Maximum of 100 queries, each up to 4096 characters long.
searchquerystringNo—Search term that fuzzily filters list results. Up to 256 characters.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model topicList: total (total number of matches, not calculated when total=false) + topics[] (current page of data).

Key fields of the element model topic:

FieldTypeDescription
$idstringTopic ID.
$createdAtstringTopic creation time (ISO 8601).
$updatedAtstringTopic update time (ISO 8601).
namestringTopic name.
emailTotalintegerNumber of email targets subscribed to this topic.
smsTotalintegerNumber of SMS targets subscribed to this topic.
pushTotalintegerNumber of push targets subscribed to this topic.
subscribestring[]Roles that can subscribe.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/topics" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)" \
  --data-urlencode "search=welcome"

Response example:

{
  "total": 5,
  "topics": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "name": "events",
      "emailTotal": 100,
      "smsTotal": 100,
      "pushTotal": 100,
      "subscribe": [
        "users"
      ]
    }
  ]
}

POST /v1/messaging/topics

Create topic: subscribe controls which roles can subscribe (defaults to all users) (scope topics.write. SDK: Topics.createTopic.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
topicIdbodystringYes—Topic ID. A custom new ID can be provided.
namebodystringYes—Topic name.
subscribebodystring[]No—Array of roles that have subscribe permission. By default, all users can subscribe. Maximum of 100 roles, each up to 64 characters long.

Output: 201, model topic, fields:

FieldTypeDescription
$idstringTopic ID.
$createdAtstringTopic creation time (ISO 8601).
$updatedAtstringTopic update time (ISO 8601).
namestringTopic name.
emailTotalintegerNumber of email targets subscribed to this topic.
smsTotalintegerNumber of SMS targets subscribed to this topic.
pushTotalintegerNumber of push targets subscribed to this topic.
subscribestring[]Roles that can subscribe.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/topics" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "topicId": "announcements",
  "name": "Welcome Email",
  "subscribe": [
    "users"
  ]
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "events",
  "emailTotal": 100,
  "smsTotal": 100,
  "pushTotal": 100,
  "subscribe": [
    "users"
  ]
}

GET /v1/messaging/topics/{topicId}

Read topic details and subscription counts per channel (scope topics.read. SDK: Topics.getTopic.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
topicIdpathstringYes—Topic ID.

Output: 200, model topic (full fields described above), key fields:

FieldTypeDescription
$idstringTopic ID.
$createdAtstringTopic creation time (ISO 8601).
$updatedAtstringTopic update time (ISO 8601).
namestringTopic name.
emailTotalintegerNumber of email targets subscribed to this topic.
smsTotalintegerNumber of SMS targets subscribed to this topic.
pushTotalintegerNumber of push targets subscribed to this topic.
subscribestring[]Roles that can subscribe.

Call example:

curl "https://<your-endpoint>/v1/messaging/topics/<TOPIC_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "events",
  "emailTotal": 100,
  "smsTotal": 100,
  "pushTotal": 100,
  "subscribe": [
    "users"
  ]
}

PATCH /v1/messaging/topics/{topicId}

Update topic name and subscribable roles (scope topics.write. SDK: Topics.updateTopic.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
namebodystringNoCan be nullTopic name.
subscribebodystring[]NoCan be nullArray of roles that have subscribe permission. By default, all users can subscribe. Maximum of 100 roles, each up to 64 characters long.
topicIdpathstringYes—Topic ID.

Output: 200, model topic (full fields described above), key fields:

FieldTypeDescription
$idstringTopic ID.
$createdAtstringTopic creation time (ISO 8601).
$updatedAtstringTopic update time (ISO 8601).
namestringTopic name.
emailTotalintegerNumber of email targets subscribed to this topic.
smsTotalintegerNumber of SMS targets subscribed to this topic.
pushTotalintegerNumber of push targets subscribed to this topic.
subscribestring[]Roles that can subscribe.

Call example:

curl -X PATCH "https://<your-endpoint>/v1/messaging/topics/<TOPIC_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "subscribe": [
    "users"
  ]
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "name": "events",
  "emailTotal": 100,
  "smsTotal": 100,
  "pushTotal": 100,
  "subscribe": [
    "users"
  ]
}

DELETE /v1/messaging/topics/{topicId}

Delete a topic and its subscriptions (scope topics.write. SDK: Topics.deleteTopic.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
topicIdpathstringYes—Topic ID.

Output: 204 No response body.

Call example:

curl -X DELETE "https://<your-endpoint>/v1/messaging/topics/<TOPIC_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

_Binary stream or no response body (see output description)._

GET /v1/messaging/topics/{topicId}/logs

List delivery logs for this topic (only limit/offset pagination is supported) (scope topics.read. SDK: Topics.listTopicLogs.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
topicIdpathstringYes—Topic ID.
queriesquerystring[]NoDefaults to []Array of query strings, generated by the SDK's Query constructor (in the form of limit(25), equal("name","x")); only the limit / offset methods are supported.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model logList: total (total number of matches, not calculated when total=false) + logs[] (current page of data).

Key fields of the element model log:

FieldTypeDescription
eventstringEvent name.
userIdstringID of the user who triggered this log. When impersonation is used, the impersonator is recorded rather than the impersonated user.
userEmailstringEmail of the user who triggered this log.
modestringAPI mode when the event was triggered (admin/key, etc.).
ipstringSource IP when the event occurred.
timestringLog creation time (ISO 8601).
clientNamestringClient name.
countryNamestringCountry/region name.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/topics/<TOPIC_ID>/logs" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)"

Response example:

{
  "total": 5,
  "logs": ""
}

GET /v1/messaging/topics/{topicId}/subscribers

Paginate through subscribers of a topic (scope subscribers.read. SDK: Subscribers.listSubscribers.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
topicIdpathstringYes—ID of the topic to subscribe to.
queriesquerystring[]NoDefaults to []Array of query strings, generated by the SDK's Query constructor (in the form of limit(25), equal("name","x")); supports filtering, sorting, and pagination (limit / cursorAfter / cursorBefore); filterable attributes: targetId, topicId, userId, providerType. At most 100 queries, each at most 4096 characters.
searchquerystringNo—Search term that fuzzily filters list results. Up to 256 characters.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model subscriberList: total (total number of matches, not calculated when total=false) + subscribers[] (current page of data).

Key fields of the element model subscriber:

FieldTypeDescription
$idstringSubscriber ID.
$createdAtstringSubscription creation time (ISO 8601).
$updatedAtstringSubscription update time (ISO 8601).
targetIdstringTarget ID.
targetobjectMessage target object.
topicIdstringTopic ID.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/topics/<TOPIC_ID>/subscribers" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)" \
  --data-urlencode "search=welcome"

Response example:

{
  "total": 5,
  "subscribers": [
    {
      "$id": "66f1a2b3c4d5e6f7",
      "$createdAt": "2020-10-15T06:38:00.000+00:00",
      "$updatedAt": "2020-10-15T06:38:00.000+00:00",
      "targetId": "259125845563242502",
      "target": {
        "$id": "259125845563242502",
        "$createdAt": "2020-10-15T06:38:00.000+00:00",
        "$updatedAt": "2020-10-15T06:38:00.000+00:00",
        "providerType": "email",
        "providerId": "259125845563242502",
        "name": "ageon-app-email",
        "identifier": "random-mail@email.org",
        "userId": "5e5ea5c16897e"
      },
      "userId": "5e5ea5c16897e",
      "userName": "Aegon Targaryen",
      "topicId": "259125845563242502",
      "providerType": "email"
    }
  ]
}

POST /v1/messaging/topics/{topicId}/subscribers

Create a topic subscription for a target: the targetId must belong to a message target of an existing user (scope subscribers.write. SDK: Subscribers.createSubscriber.)

Input (application/json)

ParameterLocationTypeRequiredDefault/enumDescription
subscriberIdbodystringYes—Subscriber ID. A new custom ID can be provided.
targetIdbodystringYes—Target ID to associate with the topic (a message target from users).
topicIdpathstringYes—ID of the topic to subscribe to.

Output: 201, model subscriber, fields:

FieldTypeDescription
$idstringSubscriber ID.
$createdAtstringSubscription creation time (ISO 8601).
$updatedAtstringSubscription update time (ISO 8601).
targetIdstringTarget ID.
targetobjectMessage target object.
userIdstringUser ID associated with the subscriber.
userNamestringUsername associated with the subscriber.
topicIdstringTopic ID.
providerTypestringTarget channel type: email / sms / push.

Call example:

curl -X POST "https://<your-endpoint>/v1/messaging/topics/<TOPIC_ID>/subscribers" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "subscriberId": "66f1a2b3c4d5e6f7",
  "targetId": "66f1a2b3c4d5e6f7"
}'

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "targetId": "259125845563242502",
  "target": {
    "$id": "259125845563242502",
    "$createdAt": "2020-10-15T06:38:00.000+00:00",
    "$updatedAt": "2020-10-15T06:38:00.000+00:00",
    "providerType": "email",
    "providerId": "259125845563242502",
    "name": "ageon-app-email",
    "identifier": "random-mail@email.org",
    "userId": "5e5ea5c16897e"
  },
  "userId": "5e5ea5c16897e",
  "userName": "Aegon Targaryen",
  "topicId": "259125845563242502",
  "providerType": "email"
}

GET /v1/messaging/topics/{topicId}/subscribers/{subscriberId}

Read a single subscription (scope subscribers.read. SDK: Subscribers.getSubscriber.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
topicIdpathstringYes—ID of the topic to subscribe to.
subscriberIdpathstringYes—Subscriber ID.

Output: 200, model subscriber (full fields described above), key fields:

FieldTypeDescription
$idstringSubscriber ID.
$createdAtstringSubscription creation time (ISO 8601).
$updatedAtstringSubscription update time (ISO 8601).
targetIdstringTarget ID.
targetobjectMessage target object.
topicIdstringTopic ID.

Call example:

curl "https://<your-endpoint>/v1/messaging/topics/<TOPIC_ID>/subscribers/<SUBSCRIBER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

{
  "$id": "66f1a2b3c4d5e6f7",
  "$createdAt": "2020-10-15T06:38:00.000+00:00",
  "$updatedAt": "2020-10-15T06:38:00.000+00:00",
  "targetId": "259125845563242502",
  "target": {
    "$id": "259125845563242502",
    "$createdAt": "2020-10-15T06:38:00.000+00:00",
    "$updatedAt": "2020-10-15T06:38:00.000+00:00",
    "providerType": "email",
    "providerId": "259125845563242502",
    "name": "ageon-app-email",
    "identifier": "random-mail@email.org",
    "userId": "5e5ea5c16897e"
  },
  "userId": "5e5ea5c16897e",
  "userName": "Aegon Targaryen",
  "topicId": "259125845563242502",
  "providerType": "email"
}

DELETE /v1/messaging/topics/{topicId}/subscribers/{subscriberId}

Unsubscribe: delete the subscription (scope subscribers.write. SDK: Subscribers.deleteSubscriber.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
topicIdpathstringYes—ID of the topic to subscribe to.
subscriberIdpathstringYes—Subscriber ID.

Output: 204 No response body.

Call example:

curl -X DELETE "https://<your-endpoint>/v1/messaging/topics/<TOPIC_ID>/subscribers/<SUBSCRIBER_ID>" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>"

Response example:

_Binary stream or no response body (see output description)._

GET /v1/messaging/subscribers/{subscriberId}/logs

List delivery logs for this subscriber (only limit/offset pagination is supported) (scope subscribers.read. SDK: Subscribers.listSubscriberLogs.)

Input

ParameterLocationTypeRequiredDefault/enumDescription
subscriberIdpathstringYes—Subscriber ID.
queriesquerystring[]NoDefaults to []Array of query strings, generated by the SDK's Query constructor (in the form of limit(25), equal("name","x")); only the limit / offset methods are supported.
totalquerybooleanNoDefault trueWhen set to false, skips total count calculation and the returned total is fixed at 0.

Output: 200, model logList: total (total number of matches, not calculated when total=false) + logs[] (current page of data).

Key fields of the element model log:

FieldTypeDescription
eventstringEvent name.
userIdstringID of the user who triggered this log. When impersonation is used, the impersonator is recorded rather than the impersonated user.
userEmailstringEmail of the user who triggered this log.
modestringAPI mode when the event was triggered (admin/key, etc.).
ipstringSource IP when the event occurred.
timestringLog creation time (ISO 8601).
clientNamestringClient name.
countryNamestringCountry/region name.

Call example:

curl -G "https://<your-endpoint>/v1/messaging/subscribers/<SUBSCRIBER_ID>/logs" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  -H "X-Appwrite-Key: <YOUR_API_KEY>" \
  --data-urlencode "queries[]=limit(25)"

Response example:

{
  "total": 5,
  "logs": ""
}

Errors and boundaries

Correspondence with the Server SDK

service.methodEndpoint
Messaging.listMessages / getMessage / deleteMessageGET /messaging/messages、GET|DELETE .../messages/{messageId}
Messaging.createEmail / updateEmail、createSms / updateSms、createPush / updatePushPOST|PATCH /messaging/messages/{email|sms|push}
Messaging.listTargets / listMessageLogsGET .../messages/{messageId}/targets、.../logs
Messaging.listProviders / getProvider / deleteProvider / listProviderLogs/messaging/providers*
Messaging.createApnsProvider … createVonageProvider (11 types), updateApnsProvider … updateVonageProviderPOST|PATCH /messaging/providers/{type}
Messaging.listTopics / createTopic / getTopic / updateTopic / deleteTopic / listTopicLogs/messaging/topics*
Messaging.listSubscribers / createSubscriber / getSubscriber / deleteSubscriber / listSubscriberLogs/messaging/topics/{topicId}/subscribers*、/messaging/subscribers/{subscriberId}/logs