Scheduled messages
Manage sends created with delay or scheduleTime through POST /v1/messages, POST /v1/messages/template or POST /v1/messages/email. Use the messageId from the HTTP 202 response to read, reschedule or cancel them.
The REST API returns the list in messages; the SDK returns it in page.data. REST get, reschedule and cancel include the resource in data. The SDK returns that resource directly.
Example
curl "https://api.platic.ai/v1/messages/scheduled?status=failed" \
-H "Authorization: Bearer $PLATIC_API_KEY" const page = await platic.messages.scheduled.list({ status: ["failed"] }); Read messages in page.data. To continue, send page.nextPageToken as pageToken, or use `platic.messages.scheduled.iterate()
Endpoint summary
| Operation | Endpoint | Use |
|---|---|---|
| List | GET /v1/messages/scheduled | Filter messages and walk through paginated results. |
| Get | GET /v1/messages/scheduled/{messageId} | Get a message by its public ID. |
| Reschedule | PATCH /v1/messages/scheduled/{messageId} | Change the date or the delay before processing. |
| Cancel | DELETE /v1/messages/scheduled/{messageId} | Cancel a send before processing. |
Responses show a preview, not the full content or internal identifiers such as taskId. Manage the send with messageId; you do not need campaignId, runId or other internal IDs.
Create a scheduled message
To create the send, use Send a message, Send a template or Send an email with exactly one of these fields:
delay: from3000ms to86400000ms (24 hours).scheduleTime: a future date in ISO 8601, at most 30 days after the request.
Send one of the two fields. Save the messageId from the HTTP 202 response to manage the send.
Public resource
The resource appears inside data when getting, rescheduling or cancelling. Each item in a list's messages has the same shape. Emails are classified as kind: "service" with messageType: "email":
{
"messageId": "msg_01JQ91AB7C4D8E2F6G0H",
"kind": "template",
"status": "scheduled",
"channelId": "wb-12345",
"conversationId": "5215512345678",
"campaignId": "api",
"messageType": null,
"templateName": "appointment_reminder",
"preview": "Hi Ana, a reminder of your appointment...",
"phoneNumber": "5215512345678",
"name": "Ana",
"executeAt": "2026-10-15T15:45:00.000Z",
"createdAt": "2026-09-20T20:00:00.000Z",
"updatedAt": "2026-09-20T20:00:00.000Z",
"cancelledAt": null,
"sentAt": null,
"failedAt": null,
"error": null,
"reschedulable": true
} | Field | Type | Description |
|---|---|---|
messageId | string | Public, stable identifier of the message. |
kind | enum | service for service messages or template for templates. |
status | enum | creating, delayed, scheduled, processing, sent, cancelled or failed. |
channelId | string | Channel the message will be or was sent from. |
conversationId | string | null | Associated conversation or recipient, when available. |
campaignId | string | null | Attribution campaign, when there is one. It is not used to manage the message. |
messageType | string | null | Type of the service message, for example text or image. |
templateName | string | null | Template name when kind is template. |
preview | string | null | Safe preview of the content. It is not the full payload. |
phoneNumber | string | null | Recipient's phone number, when available. |
name | string | null | Recipient's name, when available. |
executeAt | string | Execution date normalized to ISO 8601 UTC. |
createdAt | string | Creation date in ISO 8601 UTC. |
updatedAt | string | Date of the last update in ISO 8601 UTC. |
cancelledAt | string | null | Cancellation date. |
sentAt | string | null | Date of the successful send. |
failedAt | string | null | Date of the final failure. |
error | string | null | Public failure information, if the status is failed. |
reschedulable | boolean | Whether the message still accepts PATCH. |
List scheduled messages
Without filters, it returns the active messages with status creating, delayed, scheduled or processing. See the example at the top of the page for the cURL and SDK calls.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
workspace | string | — | Workspace to query. Only required when the API key has access to several workspaces. |
status | CSV string | creating,delayed,scheduled,processing | One or more statuses: creating, delayed, scheduled, processing, sent, cancelled, failed. |
kind | enum | — | Filter by service or template. |
campaignId | string | — | Filter by campaign. It is only a filter; it is not required to manage a message by messageId. |
from | ISO 8601 string | — | Start of the executeAt range. |
to | ISO 8601 string | — | End of the executeAt range. |
limit | integer | 50 | Results per page, from 1 to 200. |
pageToken | string | — | Opaque token returned by the previous page. |
Example with filters:
curl "https://api.platic.ai/v1/messages/scheduled?status=scheduled,processing&kind=template&from=2026-10-01T00%3A00%3A00Z&to=2026-11-01T00%3A00%3A00Z&limit=50" \
-H "Authorization: Bearer $PLATIC_API_KEY" Response
| Field | Description |
|---|---|
messages | Public resources of the current page. |
count | Number of elements in messages. |
nextPageToken | Token to request the next page. Omitted on the last page. |
Pagination
count is the number of items on the current page. If you receive nextPageToken, there is another page: send it as pageToken without changing it or the filters.
curl "https://api.platic.ai/v1/messages/scheduled?status=scheduled,processing&kind=template&limit=50&pageToken=eyJleGVjdXRlQXQiOiIyMDI2LTEwLTE1VDE1OjQ1OjAwLjAwMFoifQ" \
-H "Authorization: Bearer $PLATIC_API_KEY" If there is no nextPageToken, you reached the last page.
Get a scheduled message
curl https://api.platic.ai/v1/messages/scheduled/$MESSAGE_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" const message = await platic.messages.scheduled.get("message_123"); Resource parameters
The same parameters apply to the get, reschedule and cancel operations.
| Parameter | Location | Type | Description | Required |
|---|---|---|---|---|
messageId | path | string | ID returned when the message was created. | ✓ |
workspace | query | string | Workspace of the message. Only required for multi-workspace API keys. | — |
Response
Returns { "status": "success", "data": … } with the public resource for messageId under data.
{
"status": "success",
"data": {
"messageId": "msg_01JQ91AB7C4D8E2F6G0H",
"kind": "template",
"status": "scheduled",
"...": "…"
}
} Reschedule a scheduled message
Send exactly one of scheduleTime or delay. You do not need to send campaignId, runId or the original payload.
curl -X PATCH https://api.platic.ai/v1/messages/scheduled/$MESSAGE_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "scheduleTime": "2030-01-15T16:00:00Z" }' await platic.messages.scheduled.reschedule("message_123", {
scheduleTime: "2030-01-15T16:00:00Z",
}); Request body
Reschedule to an absolute date:
{
"scheduleTime": "2026-10-16T10:30:00-06:00"
} Or move it with a delay relative to the moment of the request:
{
"delay": 3600000
} | Field | Type | Required | Description |
|---|---|---|---|
scheduleTime | ISO 8601 string | ✓¹ | New future date, at most 30 days after the request. Cannot be combined with delay. |
delay | integer | ✓¹ | New delay from 3000 to 86400000 ms (24 hours). Cannot be combined with scheduleTime. |
¹ Send exactly one.
Response
Returns { "status": "success", "data": … } with the updated public resource inside data, without message. The status becomes scheduled with scheduleTime or delayed with delay.
If reschedulable is false, the message can no longer be rescheduled.
Cancel a scheduled message
Cancels the send and returns the resource with status cancelled.
curl -X DELETE https://api.platic.ai/v1/messages/scheduled/$MESSAGE_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.messages.scheduled.cancel("message_123"); Response
Returns { "status": "success", "data": … } with the public resource under data, with status: "cancelled", cancelledAt and reschedulable: false. Cancelling is idempotent: repeating DELETE on an already cancelled message returns the same resource and has no other effect.
Errors
See API errors for the format and the common codes.
| Status | details.code | When it happens |
|---|---|---|
400 | INVALID_REQUEST | A filter, limit, from after to, pageToken or messageId (empty or with a /) is invalid. On reschedule, scheduleTime and delay are sent together or neither, or delay is not an integer in range. details.issues says which field |
400 | INVALID_SCHEDULE | On reschedule: scheduleTime is not a valid ISO 8601 date, is in the past or is more than 30 days ahead. details.issues points at scheduleTime |
400 | INVALID_REQUEST | Your credential covers several workspaces and you did not send ?workspace=, or you sent one it does not cover. details.available lists the ones you can use and details.requested repeats the one you sent |
401 | UNAUTHENTICATED | The credential is missing or invalid |
403 | FORBIDDEN | The credential does not have the module (Missing <module> permission), or, on the list, the session is limited to its own campaign |
403 | INSUFFICIENT_SCOPE | An OAuth token without the platica:write scope tried to reschedule or cancel. details.requiredScope says which one is missing |
404 | SCHEDULED_MESSAGE_NOT_FOUND | No scheduled message has that messageId |
409 | SCHEDULE_NOT_RESCHEDULABLE | On reschedule: only creating, delayed and scheduled messages can change. details.status carries the current one |
409 | LEGACY_SCHEDULE_NOT_RESCHEDULABLE | On reschedule: it was created by the previous scheduler. Cancel it and send it again |
409 | SCHEDULE_VERSION_CONFLICT | On reschedule: the message changed while it was being rescheduled. Get it again and retry |
409 | SCHEDULE_NOT_CANCELLABLE | On cancel: it is already processing, sent or failed. details.status carries the current one |
409 | LEGACY_TASK_ALREADY_DISPATCHED | On cancel: it was created by the previous scheduler and its task already left the queue |
502 | UPSTREAM_ERROR | On reschedule: the replacement task could not be created. Try again |
502 | LEGACY_TASK_DELETE_FAILED | On cancel: the task of a message from the previous scheduler could not be deleted. Try again |
{
"code": 404,
"error": "Not Found - The resource doesn't exist",
"details": {
"code": "SCHEDULED_MESSAGE_NOT_FOUND",
"message": "Scheduled message not found"
}
} On a 409, get the message again and decide from status and reschedulable.
Notes
Statuses and transitions
creatingnormally lasts only a few moments while the task is registered.delayedandscheduledare the same pending state.PATCHlets you switch between them without altering the rest of the flow.- While it is pending,
DELETEmoves it tocancelled. processingmeans execution has already started; it cannot be rescheduled or cancelled.sent,cancelledandfailedare final states.- The service window, the contact's blocked status and the channel rules are validated again on execution. An accepted message can end up
failed.
Dates and time zones
- Send
scheduleTime,fromandtoin ISO 8601 format. - Include
Zor an offset such as-06:00to avoid ambiguity. When you omit the zone,scheduleTimeuses Mexico time. executeAt,createdAt,updatedAt,cancelledAt,sentAtandfailedAtare always returned normalized to UTC.delayis computed from the moment the API accepts the request.
Idempotency
GET calls only read data and can be repeated. A PATCH with delay calculates the delay from each request: repeating it changes the date. If you lose the response, get the resource by messageId first.
Scheduled turns from the Chat API use scheduleAt and are managed separately. These endpoints cover sends created with POST /v1/messages, POST /v1/messages/template or POST /v1/messages/email.