Download OpenAPI specification:Download

Message

The Message endpoint is used as the primary endpoint of the API and this is where all operations on messages from the Agent are handled.

Send a Message

Send a RCS message, optionally falling back to SMS depending on provided conditions. Status reports will be continuously delivered to the HTTP(S) endpoint registered against the Sender Identity. See Webhooks for details.

Request
Security:
BearerAuth
path Parameters
sender-id
required
string (SenderId)

The Sender ID.

Example: AbcdEFGhijKlmnoP
Request Body schema: application/json

Message to be sent

required
TextMessage (object) or FileMessage (object) or StandaloneRichCardMessage (object) or CarouselRichCardMessage (object)

The content of the message

message_id
string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89...

Provide a universally unique id for this message

to
string <MSISDN> [ 9 .. 17 ] characters ^(?:00|\+|)[1-9][0-9]{8,16}$

Phone number of the recipient

mcc
string^[0-9]{3}$

Mobile country code for phone number of the recipient, must be 3 digits

mnc
string [ 2 .. 3 ] characters ^[0-9]{2,3}$

Mobile network code for the phone number of the recipient, must be 2 or 3 digits

Array of SuggestedReply (object) or SuggestedAction (object) <= 11 characters

A list of suggestions comprised of suggested replies and suggested actions.

object
object (FallbackInfo)
Responses
200

Message successfully sent

Response Schema: application/json
type
required
string
Value: "status_report_rcs"
message_id
required
string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89...

Message id for which this status report is relevant

at
required
string <RFC3339 UTC "Zulu">

Timestamp of then the status report was created in the Sinch service

required
object

The status report

400

400 Bad Request The authentication token is invalid for this service plan.

409

Conflict, duplicate message_id

post/{sender-id}/messages
Request samples
application/json
{
  • "to": "46555123456",
  • "message": {
    • "type": "text",
    • "text": "Test message!"
    },
  • "fallback": {
    • "message": {
      }
    }
}
Response samples
application/json
{
  • "type": "status_report_rcs",
  • "message_id": "5bb77a04-78b7-41ff-abd3-a1006f8d6979",
  • "at": "2019-01-18T15:41:40Z",
  • "status_report": {
    • "type": "queued"
    }
}

Delete a Message

Revoke a previously sent message, not yet delivered to the user agent.

If a message is delivered to the user agent shortly after a revoke request is initiated there is a possibility of receiving a delivered status report after sending the revoke request.

Request
Security:
BearerAuth
path Parameters
sender-id
required
string (SenderId)

The Sender ID.

Example: AbcdEFGhijKlmnoP
message-id
required
string <uuid> (MessageId) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89...

The ID of the message to revoke

Responses
200

Message revoked

404

Unknown Message ID

409

Unable to delete.
Message has already been sent or the message is expired and sent as a fallback message

delete/{sender-id}/messages/{message-id}
Request samples
curl -i -X DELETE \
  'https://us.rcs.api.sinch.com/rcs/v1/{sender-id}/messages/{message-id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'