To redact a message-body from a post-flight message record

POST /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json

A Message resource represents an inbound or outbound message.

To redact a message-body from a post-flight message record, post to the message instance resource with an empty body

Path parameters

  • AccountSid string Required

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

  • Sid string Required

    The Twilio-provided string that uniquely identifies the Message resource to update.

application/x-www-form-urlencoded

Body

  • Body string

    The text of the message you want to send. Can be up to 1,600 characters long.

  • Status string

    When set as canceled, allows a message cancelation request if a message has not yet been sent.

    Value is canceled.

Responses

  • 200

    OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • api_version string | null

      The API version used to process the message

    • body string | null

      The message text

    • date_created string(date-time-rfc-2822) | null

      The RFC 2822 date and time in GMT that the resource was created

    • date_sent string(date-time-rfc-2822) | null

      The RFC 2822 date and time in GMT when the message was sent

    • date_updated string(date-time-rfc-2822) | null

      The RFC 2822 date and time in GMT that the resource was last updated

    • direction string | null

      The direction of the message

      Values are inbound, outbound-api, outbound-call, or outbound-reply.

    • error_code integer | null

      The error code associated with the message

    • error_message string | null

      The description of the error_code

    • from string(phone-number) | null

      The phone number that initiated the message

    • The SID of the Messaging Service used with the message.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MG[0-9a-fA-F]{32}$.

    • num_media string | null

      The number of media files associated with the message

    • num_segments string | null

      The number of messages used to deliver the message body

    • price string | null

      The amount billed for the message

    • price_unit string(currency) | null

      The currency in which price is measured

    • sid string | null

      The unique string that identifies the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^(SM|MM)[0-9a-fA-F]{32}$.

    • status string | null

      The status of the message

      Values are queued, sending, sent, failed, delivered, undelivered, receiving, received, accepted, scheduled, read, partially_delivered, or canceled.

    • subresource_uris object(uri-map) | null

      A list of related resources identified by their relative URIs

    • to string | null

      The phone number that received the message

    • uri string | null

      The URI of the resource, relative to https://api.twilio.com

POST /2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json
curl \
 -X POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages/{Sid}.json \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'Body=string&Status=canceled'
Request example
{
  "Body": "string",
  "Status": "canceled"
}
Response examples (200)
{
  "account_sid": "string",
  "api_version": "string",
  "body": "string",
  "date_created": "string",
  "date_sent": "string",
  "date_updated": "string",
  "direction": "inbound",
  "error_code": 42,
  "error_message": "string",
  "from": "string",
  "messaging_service_sid": "string",
  "num_media": "string",
  "num_segments": "string",
  "price": "string",
  "price_unit": "string",
  "sid": "string",
  "status": "queued",
  "subresource_uris": {},
  "to": "string",
  "uri": "string"
}