MessageOS
APIMessagesDraftsId

Edit a pending draft

PATCH
/messages/drafts/{id}

Replaces the text while the draft is pending and has not expired. Scope: messages:write.

Authorization

bearer
headerAuthorizationBearer <mosc_...>

A client key (mosc_).

Path Parameters

id*integer

The draft id.

Range0 < value

Request Body

application/json
  1. body
text*string
Length1 <= length <= 2000

Response Body

The updated draft.

application/json
  1. response
id*integer

The draft id.

status*string
text*string

Example request

curl -X PATCH 'https://api.messageos.ai/v1/messages/drafts/42' \  -H 'Authorization: Bearer mosc_...' \  -H 'Content-Type: application/json' \  -d '{  "text": "Hi Pat, see you Tuesday at 3:00 PM."}'

Example response

{  "id": 15,  "status": "pending_approval",  "text": "Hi Pat, this is a reminder about your visit on Tuesday at 3:00 PM."}