APIMessagesDraftsIdApprove
Approve and send a draft
POST
Sends the draft once, under the same rules as any other send. Approving again returns 409. A draft that expired cannot be approved. Scope: messages:write.
bearerheader
AuthorizationBearer <mosc_...>A client key (mosc_).
id*integerThe draft id.
Range
0 < valueThe draft was sent.
application/json- response
id*integerThe draft id.
status*stringcaptured means the draft was written in a MessageOS test session. Nothing was delivered, and the draft stays pending.
Value in
"sent""captured"text*stringauditId*integerThe send record. message.delivered and message.failed carry the same number as messageId.
Example request
curl -X POST 'https://api.messageos.ai/v1/messages/drafts/42/approve' \ -H 'Authorization: Bearer mosc_...'Example response
{ "id": 15, "status": "sent", "text": "Hi Pat, this is a reminder about your visit on Tuesday at 3:00 PM.", "auditId": 123}