For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
cXMLREST API
cXMLREST API
  • Core
    • Overview
    • Authorization
    • Error codes
    • Paging
    • REST client SDKs
  • Compatibility REST API
      • GETList all Messages
      • POSTCreate a Message
      • GETRetrieve a Message
      • POSTUpdate a Message
      • DELDelete a Message
LogoLogoSignalWire Docs
Log inSign up
Support
Compatibility REST APIMessages

Update a Message

|View as Markdown|Open in Claude|
POST
https://your_space.signalwire.com/api/laml/2010-04-01/Accounts/:AccountSid/Messages/:Sid
POST
/api/laml/2010-04-01/Accounts/:AccountSid/Messages/:Sid
$curl -X POST https://your_space.signalwire.com/api/laml/2010-04-01/Accounts/AccountSid/Messages/Sid \
> -H "Content-Type: application/x-www-form-urlencoded" \
> -u "<project_id>:<api_token>" \
> -d "Body="
1{
2 "account_sid": "ea108133-d6b3-407c-9536-9fad8a929a6a",
3 "api_version": "2010-04-01",
4 "body": "Hello World!",
5 "num_segments": 1,
6 "num_media": 1,
7 "date_created": "Mon, 13 Aug 2018 21:38:46 +0000",
8 "date_sent": "Mon, 13 Aug 2018 21:38:46 +0000",
9 "date_updated": "Mon, 13 Aug 2018 21:38:46 +0000",
10 "direction": "inbound",
11 "error_code": "30001",
12 "error_message": "Queue overflow",
13 "from": "+15551234567",
14 "price": 0.005,
15 "price_unit": "USD",
16 "sid": "0a059168-ead0-41af-9d1f-343dae832527",
17 "status": "queued",
18 "to": "+15557654321",
19 "messaging_service_sid": "b3877c40-da60-4998-90ad-b792e98472ms",
20 "uri": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527.json",
21 "subresource_uris": {
22 "media": "/api/laml/2010-04-01/Accounts/ea108133-d6b3-407c-9536-9fad8a929a6a/Messages/0a059168-ead0-41af-9d1f-343dae832527/Media.json"
23 }
24}
Update a message body after it has been sent. Currently, the only supported update is redacting the message by setting the body to an empty string. Messages that are still in progress (queued or initiated status) cannot be updated. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Messaging_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space).
Was this page helpful?
Previous

Delete a Message

Next
Built with

Update a message body after it has been sent. Currently, the only supported update is redacting the message by setting the body to an empty string. Messages that are still in progress (queued or initiated status) cannot be updated.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Messaging.

Learn more about API scopes.

Authentication

AuthorizationBasic
SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ```

Path parameters

AccountSidstringRequiredformat: "uuid"
The unique identifier of the project that sent or received this message.
SidstringRequiredformat: "uuid"
A unique ID that identifies this specific message.

Request

This endpoint expects an object.
BodystringRequired<=0 characters
The new body of the message. Must be an empty string to redact the message content.

Response

The request has succeeded.
account_sidstringformat: "uuid"
The unique identifier of the project that sent or received this message.
api_versionstring
The version number of the SignalWire cXML REST API used to handle this message.
bodystring or null
The text of the message. Up to 1600 characters long. May be null if filtered for spam.
num_segmentsinteger
The number of segments that make up the entire message.
num_mediainteger
The number of media files that were included with the message.
date_createdstring
The date and time the message was created in RFC 2822 format.
date_sentstring or null
The date and time the message was sent in RFC 2822 format, or null if not yet sent.
date_updatedstring
The date and time the message was last updated in RFC 2822 format.
directionenum
The direction of the message.
Allowed values:
error_codestring or null
If an error has occurred on the message, the error code will give you a specific code, or null if no error.
error_messagestring or null
A human readable description of the error that occurred, or null if no error.
fromstring
The phone number in E.164 format that sent the message.
pricedouble or null
The cost of the individual message billed to your project, or null if not yet calculated.
price_unitstring

The currency in which price is charged as.

sidstringformat: "uuid"
A unique ID that identifies this specific message.
statusenum
Current status of the message.
tostring
The phone number in E.164 format that received the message.
messaging_service_sidstring or nullformat: "uuid"
If a number group was used when sending an outbound message, the number group's ID will be present, or null otherwise.
uristring
The URI of this particular message.
subresource_urisobject
The URIs for any subresources associated with this message.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)