RCS

Send RCS message

Changed on

This endpoint is in beta and may change in future versions. Sends an RCS message to a single recipient.

The message can be text (content_type: text) or a single image or video (content_type: media). For media, we fetch the start of the file when you send the request, which can add up to 10 seconds. The request fails with 400 if the file isn't publicly reachable over https, redirects, doesn't respond in time, or has an unsupported, mismatched or oversized file type. Each problem is reported against content.media.file_url.

post/v2/rcs/messages

Request

  • Base URL
    https://api.transmitmessage.com
  • Auth
    API key in header x-api-key

Request body

senderstring required

The RCS agent ID assigned to your registered agent.

Unlike SMS, WhatsApp, and MMS, RCS messages do not come from a phone number. They are always sent through an agent.

  • Must be a registered RCS agent identifier.
  • Example: DemoSender
  • Can be alphanumeric or numeric.
recipientstring phone required

The destination number for delivery. Can be either in local format or in international format. For international format, it should follow the E.164 standard.

Examples of conversions to E.164 format:

  • Australia: 0438 333 061 → 61438333061
  • UK: 07123 456 789 → 447123456789
content_type'text' | 'media' required

Type of the message content. Must match the key used in content.

  • text — a text message, sent in content.text
  • media — a single image or video, sent in content.media
message_refstring

A reference supplied by your system. Maximum length of 500 characters.

This reference is included in webhook events so you can relate events with the original message.

For example, being able to relate a Link Hit event to a specific sent message.

Example request

{
  "sender": "DemoSender",
  "recipient": "447903749662",
  "content_type": "text",
  "content": {
    "text": {
      "message": "Hi Michael,\nJust a quick reminder. You are amazing!!\nReply STOP to opt out."
    }
  },
  "message_ref": "order-12345"
}

Response

OK

requestobject

Optional metadata (e.g. requestId, traceId)

metaobject

Optional pagination, feature flags, etc.

Example response

{
  "data": {
    "id": "6fdae71c-dad7-4c36-9734-a69693ecf3b4",
    "message_ref": "order-12345",
    "sender": "DemoSender",
    "recipient": "447903749662",
    "content_type": "text",
    "content": {
      "text": {
        "message": "Hi Michael,\nJust a quick reminder. You are amazing!!\nReply STOP to opt out."
      }
    },
    "created_at": "2021-01-01T00:00:00Z"
  }
}

Changes

    • breaking

      added the new required request property //////

    • breaking

      removed the required property //////// from the response with the status

    • warning

      removed the request property //////

    • info

      added the required property //////// to the response with the status

    • breaking

      added to the // response property oneOf list for the response status

    • warning

      added the new media enum value to the // response property for the response status

    • info

      added the new media enum value to the request property

    • info

      added to the request property oneOf list