Update a message
https://api.reach.talkylabs.com/rest/messaging/v1/update
This operation allows to update the body of a message. It is primarily used to redact the content of message while leaving all the other properties untouched.
This operation needs the messageId
of the message to be updated. It also requires the body
that will be newly associated with the message. To update multiple messages, this operation should be called as many times as needed since it can only update one message at a time.
Note: This operation does not modify the content of the message already sent to the recipient. It simply updates the message "body" in the Reach platform.
Parameters
messageIdstringrequired
The identifier of the message to be updated.
bodystringrequired
The new text to be associated with the message.
Example 1: Update the content of a message
curl -X POST https://api.reach.talkylabs.com/rest/messaging/v1/update --data-urlencode "messageId=MIDXXXXXXXXXXXXXX" --data-urlencode "body=A new message." -H "ApiUser: $REACH_TALKYLABS_API_USER" -H "ApiKey: $REACH_TALKYLABS_API_KEY"
{
"appletId": "AIDXXXXXXXXXXXX",
"apiVersion": "1.0.0",
"body": "A new message.",
"dest": "+237671234567",
"src": "+237691234567",
"numSegments": 1,
"numMedia": 0,
"price": 25,
"priceUnit": "xaf",
"messageId": "MIDXXXXXXXXXXXXXX",
"status": "scheduled",
"messageType": "outbound",
"errorCode": null,
"errorMessage": null,
"dateCreated": "2016-08-29T09:12:33.001Z",
"dateSent": null,
"dateUpdated": "2016-08-29T09:12:35.001Z"
}
Example 2: Redact the content of a message
In this example, we will redact the body of a message whose identifier is specified. To do so, the body of the message will be set to ""
.
curl -X POST https://api.reach.talkylabs.com/rest/messaging/v1/update --data-urlencode "messageId=MIDXXXXXXXXXXXXXX" --data-urlencode "body=" -H "ApiUser: $REACH_TALKYLABS_API_USER" -H "ApiKey: $REACH_TALKYLABS_API_KEY"
{
"appletId": "AIDXXXXXXXXXXXX",
"apiVersion": "1.0.0",
"body": "",
"dest": "+237671234567",
"src": "+237691234567",
"numSegments": 1,
"numMedia": 0,
"price": 25,
"priceUnit": "xaf",
"messageId": "MIDXXXXXXXXXXXXXX",
"status": "scheduled",
"messageType": "outbound",
"errorCode": null,
"errorMessage": null,
"dateCreated": "2016-08-29T09:12:33.001Z",
"dateSent": null,
"dateUpdated": "2016-08-29T09:12:35.001Z"
}