curl --request PATCH \
--url https://omni-api.sendblue.com/messages/{message_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "canceled"
}
'{
"id": "<string>",
"direction": "inbound",
"status": "scheduled",
"to": "+14155550100",
"from": "+14155550100",
"campaign_id": "<string>",
"body": "<string>",
"media_urls": [
"<string>"
],
"segments": 123,
"price": {
"amount_micro_usd": 7900,
"currency": "USD"
},
"error_code": 123,
"status_callback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"delivery_evidence": "verified",
"billing_status": "held",
"usage": {
"message_id": "<string>",
"direction": "outbound",
"service": "SMS",
"outcome": "<string>",
"reason": "<string>",
"carrier_status": "<string>",
"estimated_parts": 123,
"billed_parts": 123,
"maximum_hold": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"base_charge": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"surcharge_charged": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"total_charge": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"uncollected": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"inbox_message_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Cancel a scheduled message, or redact a message's body.
Exactly one change per request: {"status": "canceled"} cancels a
message that is still scheduled; {"body": ""} erases the stored
body of a message that is no longer in flight. Only a message this
account sent can be changed or deleted; a received one answers 404.
Required permission: messages:write. Accepted credentials: a signed-in person, an API key, the account token.
PATCH
/
messages
/
{message_id}
curl --request PATCH \
--url https://omni-api.sendblue.com/messages/{message_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "canceled"
}
'{
"id": "<string>",
"direction": "inbound",
"status": "scheduled",
"to": "+14155550100",
"from": "+14155550100",
"campaign_id": "<string>",
"body": "<string>",
"media_urls": [
"<string>"
],
"segments": 123,
"price": {
"amount_micro_usd": 7900,
"currency": "USD"
},
"error_code": 123,
"status_callback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"delivery_evidence": "verified",
"billing_status": "held",
"usage": {
"message_id": "<string>",
"direction": "outbound",
"service": "SMS",
"outcome": "<string>",
"reason": "<string>",
"carrier_status": "<string>",
"estimated_parts": 123,
"billed_parts": 123,
"maximum_hold": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"base_charge": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"surcharge_charged": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"total_charge": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"uncollected": {
"amount": "4.00",
"amount_micro_usd": 4000000,
"currency": "USD"
},
"inbox_message_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
personbearerlegacyKeyId & legacyKeySecret
Response
The changed message.
Evidence that an iMessage line sent the message. verified is the strongest evidence, read from the sending device's own record. reported means the device's authenticated report was corroborated by a second check. reported_unconfirmed means the report lacks that corroboration. The message status separately records recipient delivery.
Available options:
verified, unknown, reported, reported_unconfirmed