Update a Draft
Edits a Message in `draft` status. Requires the `updated_at` loaded from GET (optimistic concurrency); a stale value returns 409. Non-draft Messages return 409.
Edits a Message in draft status. Requires the updated_at loaded from GET (optimistic concurrency); a stale value returns 409. Non-draft Messages return 409.
bearerAuthAuthorizationBearer <API key>Project API key (cr_sk_...)
id*stringuuidapplication/json- body
Draft edit body. updated_at must match the value from GET (409 when stale). Same Draft shape rules as create with draft: true.
updated_at*stringOptimistic concurrency token from the loaded Draft.
date-timechannel?"push""push"targeting?Broadcast targeting selector for message create. Exactly one of everyone,
segment_id, or rules is required. External user ID lists belong on
to.external_user_ids (Single send), not here. Does not include preview-only
fields such as platforms.
everyone is the Everyone selector (Contacts with at least one Active Endpoint
on the Message's Channel who are not Opted out). Built-in Segments use string
IDs (seg_sys_*); saved Segments use UUIDs. Glossary names for builtins:
Everyone, New contacts, Recently active, Engaged, Dormant, Android contacts,
iOS contacts.
category?stringtype?stringname?stringpriority?string"high""normal"ttl?integer0 <= value <= 2419200collapse_key?stringlength <= 64data?send_at?|date-timesend_at_local?string|nullcontent*Updated Draft
application/json- response
message_id?stringuuidcampaign_id?|Present when this Message was created by a Multi-send Campaign; null for Single send and Broadcast.
uuidstatus?string"draft""scheduled""preparing""processing""completed""failed""cancelled"status_summary?Per-Message Delivery rollups. Counts nest: sent is every Delivery the Provider accepted (sent_at set, or status sent/delivered/opened), including ones later delivered or opened; delivered is part of sent and opened is part of delivered. failed and skipped are separate end states; queued and processing are in-flight. total is the Delivery row count. delivered uses received_at (API delivered_at) or opened_at, so an open without a prior delivered ACK still counts as reached. ctr is opened ÷ delivered (0 when delivered is 0) and never exceeds 100%. android and ios repeat the same nested counts split by the Delivery's Endpoint platform (one grouped query). failure_reasons counts failed Deliveries by error_code (unknown when missing). Time-series charts and per-attempt history are out of V1 for this summary.
recipient?|nullchannel?stringmessage?targeting?|nulltiming?attribution?curl -X PATCH 'https://api.comraid.io/messages/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "updated_at": "2019-08-24T14:15:22Z", "content": { "push": {} }}'{ "message_id": "d7d9d9fd-478f-40e6-b651-49b7f19878a2", "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904", "status": "draft", "status_summary": { "status": "string", "humanized_status": "string", "queued": 0, "processing": 0, "sent": 0, "delivered": 0, "opened": 0, "failed": 0, "skipped": 0, "remaining": 0, "total": 0, "ctr": 0.1, "android": { "queued": 0, "processing": 0, "sent": 0, "delivered": 0, "opened": 0, "failed": 0, "skipped": 0, "remaining": 0, "total": 0, "ctr": 0.1 }, "ios": { "queued": 0, "processing": 0, "sent": 0, "delivered": 0, "opened": 0, "failed": 0, "skipped": 0, "remaining": 0, "total": 0, "ctr": 0.1 }, "failure_reasons": { "property1": 0, "property2": 0 }, "action_clicks": { "property1": 0, "property2": 0 } }, "recipient": {}, "channel": "string", "message": {}, "targeting": {}, "timing": {}, "attribution": {}}