Search + K

Command Palette

Search for a command to run...

Sign In

Update a Message resource (used to redact Message `body` text and to cancel not-yet-sent messages)

POST /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json
Copy endpoint
https://api.twilio.com

Update a Message resource (used to redact Message body text and to cancel not-yet-sent messages)

Parameters

path Path Parameters

Name Type
AccountSid required

The SID of the Account that created the Message resources to update.

`AC${string}`
Sid required

The SID of the Message resource to be updated

string

Request Body

application/x-www-form-urlencoded
{ Body?: string;Status?: MessageEnumUpdateStatus
type MessageEnumUpdateStatus = "canceled"
; }

Responses

200 application/json

OK

interface ApiV2010AccountMessage {
body?: string | null;
num_segments?: string | null;
direction?: MessageEnumDirection

The direction of the message. Can be: inbound for incoming messages, outbound-api for messages created by the REST API, outbound-call for messages created during a call, or outbound-reply for messages created in response to an incoming message.

type MessageEnumDirection = "inbound" | "outbound-api" | "outbound-call" | "outbound-reply"
;
from?: string | null;
to?: string | null;
date_updated?: string | null;
price?: string | null;
error_message?: string | null;
uri?: string | null;
account_sid?: `AC${string}` | null;
num_media?: string | null;
status?: MessageEnumStatus

The status of the Message. Possible values: accepted, scheduled, canceled, queued, sending, sent, failed, delivered, undelivered, receiving, received, or read (WhatsApp only). For more information, See detailed descriptions.

type MessageEnumStatus = "queued" | "sending" | "sent" | "failed" | "delivered" | "undelivered" | "receiving" | "received" | "accepted" | "scheduled" | "read" | "partially_delivered" | "canceled"
;
messaging_service_sid?: `MG${string}` | null;
sid?: string | null;
date_sent?: string | null;
date_created?: string | null;
error_code?: number | null;
price_unit?: string | null;
api_version?: string | null;
subresource_uris?: {} | null;
}