ScheduledMessages

Schedule a message

Schedules a message for dispatch at the absolute ISO-8601 timestamp supplied in scheduledFor.

POST
/v1/messages/scheduled

Schedules a message for dispatch at the absolute ISO-8601 timestamp supplied in scheduledFor. Optional timezone is validated IANA display metadata only and never changes the execution instant.

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

send*
scheduledFor*AbsoluteInstantEncoded
Match^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|([+-])(\d{2}):(\d{2}))$
timezone?string|null
idempotencyKey?string|null
referenceId?string|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/messages/scheduled" \  -H "Content-Type: application/json" \  -d '{    "send": {      "channel": "email",      "to": [        {          "contactId": "string"        }      ],      "email": {}    },    "scheduledFor": "string"  }'
{  "id": "string",  "status": "pending",  "scheduledFor": "string",  "timezone": "string",  "send": {    "conversationId": "string",    "metadata": {},    "channel": "email",    "to": [      {        "contactId": "string"      }    ],    "cc": [      {        "contactId": "string"      }    ],    "bcc": [      {        "contactId": "string"      }    ],    "from": {      "email": "string",      "name": "string"    },    "email": {      "subject": "string",      "html": "string",      "text": "string",      "attachments": [        {          "filename": "string",          "content": "string",          "mediaId": "string",          "contentType": "string",          "size": 1        }      ],      "publicationId": "string",      "inputContractId": "string",      "templateId": "string",      "templateSlug": "string",      "templateData": {},      "inReplyToMessageId": "string",      "replyTo": [        "string"      ],      "unsubscribeGroupId": "string",      "tracking": {        "opens": true,        "clicks": true      },      "footer": {        "enabled": true      }    }  },  "messageId": "string",  "idempotencyKey": "string",  "referenceId": "string",  "failureReason": "string",  "attempts": 0,  "createdBy": "string",  "actorEmail": "string",  "memberRole": "string",  "createdAt": "string",  "updatedAt": "string"}