MessageOS
APIMessagesId

Take back a sent message

DELETE
/messages/{id}

Answers 404 until MessageOS turns it on for you: GET /whoami shows rcsExtras true once it is. Asks the messaging network to take back one message this agent sent through this API. id is the id from the send answer.

  • The messaging network's reference says a message can be taken back before it is delivered, and that some phones allow it after delivery until it is read.
  • This API passes on the request for any message not yet reported read, and a message that was read is refused here with 409.
  • The answer means the request was accepted. It does not mean the message was taken back, and this API has no status or event for a message that was.
  • No Idempotency-Key is needed, and asking again for the same message is safe.

Scope: messages:write.

Authorization

bearer
headerAuthorizationBearer <mosc_...>

A client key (mosc_).

Path Parameters

id*string

The id from the send answer, such as msg_123.

Response Body

The messaging network took the request.

application/json
  1. response
id*string

msg_ followed by auditId.

status*string

The messaging network took the request. It does not mean the message was taken back.

Example request

curl -X DELETE 'https://api.messageos.ai/v1/messages/msg_123' \  -H 'Authorization: Bearer mosc_...'

Example response

{  "id": "msg_123",  "status": "revoke_requested"}