APIMessagesDraftsId
Read a draft
GET
Returns one draft for this client. Hidden until craft mode is enabled. Scope: messages:write.
bearerheader
AuthorizationBearer <mosc_...>A client key (mosc_).
id*integerThe draft id.
Range
0 < valueThe draft.
application/json- response
Text waiting for approval. Approving it sends it once.
id*integerThe draft id.
contactId*integerstatus*stringValue in
"pending_approval""approved""sent""discarded""expired""blocked"text*stringmessageClass*stringexpiresAt*string24 hours after the draft was created.
Format
date-timeauditId*|The send record, once the draft was sent or blocked.
Example request
curl 'https://api.messageos.ai/v1/messages/drafts/42' \ -H 'Authorization: Bearer mosc_...'Example response
{ "id": 15, "contactId": 42, "status": "pending_approval", "text": "Hi Pat, this is a reminder about your visit on Tuesday at 3:00 PM.", "messageClass": "service", "expiresAt": "2026-10-28T23:00:00.000Z", "auditId": null}Create a draft POST
Stores text for later approval. It does not send. Hidden until craft mode is enabled. With inReplyTo, the draft answers that message, and it is sent as a reply only if it is approved while the message is still within the reply window. Scope: messages:write.
Edit a pending draft PATCH
Replaces the text while the draft is pending and has not expired. Scope: messages:write.
