Tutorials
Send RCS messages to end users
Send RCS messages to end users

Send RCS messages to end users

Rich communication services (RCS) offers advanced features such as sharing files and media, interactive buttons, and carousels. Use RCS to promote your products and services, send appointment reminders, send important service messages, and more.

This tutorial describes how to send the following message types to end users:

  • Over Broadcast: Text message
  • Over API: Text, PDF, Audio, Video, Card, and Carousel messages

Customize the examples in the tutorial for other message types.

Products and channels

Prerequisites

  • Infobip account with RCS enabled. Contact your Infobip account manager regarding the number of assigned free credits/RCS messages.

    Broadcast is enabled by default with your Infobip account.

    If you do not have an account, create a free trial account and select the RCS channel on the welcome screen.

  • Infobip API key with the rcs:message:send scope.

    For information about creating an API key with the required scope, refer to API authorization.

  • HTTP client. This tutorial uses curl. Alternatively, you can choose the official Infobip SDK for the required programming language.

  • RCS agent or sender must be configured and launched on the mobile network/carrier in which you want to check the RCS capability of destination phone numbers.

    If the agent or sender is not launched on the network, the capability check request always returns a negative status for the destination phone numbers.

    To launch the sender or to configure a custom RCS sender, contact your Infobip account manager.

  • A destination phone number to which you can send the RCS message.

    If the RCS agent is not launched, you can only send messages to safelisted phone numbers.

Implementation over the Infobip web interface

Safelist a phone number

Note

This feature is in Early access phase. For more information, contact your Infobip account manager.

  1. On the Infobip web interface (opens in a new tab), go to Channels and numbers > Channels > RCS Business Messaging > Senders tab.

    A list of all RCS senders for your account and their statuses is displayed.

    Senders tab
  2. Select the sender that you want to use to send messages.

    Select the sender
  3. In the Test devices tab, select Add test device.

    Add test device
  4. Enter the phone number in international format with country prefix.

    Add phone number
  5. Select Create.

The new number is in Pending status until the tester's invitation is accepted.

When the number is accepted, the status is displayed as Ready. You are now ready to send your first test RCS message.

Send an RCS message over Broadcast

  1. On the Infobip web interface (opens in a new tab), go to Moments > Broadcasts.

  2. Select Create broadcast.

  3. Select RCS as the channel.

  4. Configure the Recipients and Sender fields.

  5. Select to create content.

    Create the message content
  6. Select the type of message to send. This tutorial uses Text message type.

    Create a Text message
  7. Enter the message content.

  8. Select Done designing.

  9. Configure the other fields in the broadcast as required.

  10. Check all the fields and rename the broadcast if required.

  11. Select Continue to preview.

  12. Check the preview and make sure that all the information is correct.

  13. Select Launch.

To see the broadcast, go to Moments > Broadcasts.

Implementation over API

Important

When sending an RCS message over API, the URL of the resource must start with either http:// or https://.

The maximum supported file size is 100 MB.

Safelist a phone number

Note

This feature is in Early access phase. For more information, contact your Infobip account manager.

How to safelist the phone number

  1. In the RCS Service management (opens in a new tab) APIs, use the following code:

    curl -X POST https://api.infobip.com/rcs/1/senders/{senderName}/test-numbers \
    -H 'Authorization: App {YOUR_API_KEY}'\
    -H 'Content-Type: application/json' \
    {
      "testNumber": "YOUR_DESTINATION"
    }

    If the API request is successful, you will receive a response with a 200 OK status that contains a senderName, testNumber, and requestStatus.

    curl -X POST https://api.infobip.com/rcs/1/senders/{senderName}/test-numbers \
    -H 'Authorization: App {YOUR_API_KEY}'\
    -H 'Content-Type: application/json' \
    {
        "senderName": "YOUR_SENDER",
        "testNumber": "YOUR_DESTINATION",
        "requestStatus": "PENDING"
    }
  2. To check the request status for the RCS test number, either use a GET request or receive the status on the webhook (opens in a new tab).

    GET request:

    curl -X POST https://api.infobip.com/rcs/1/senders/{senderName}/test-numbers/{testNumber}/request-status \
    -H 'Authorization: App {YOUR_API_KEY}'\
    -H 'Content-Type: application/json'

    If the API request is successful, you will receive a response with a 200 OK status.

    {
        "senderName": "YOUR_SENDER",
        "testNumber": "YOUR_DESTINATION",
        "requestStatus": "COMPLETED",
        "completedAt": "2025-05-09T08:17:01.514+0000",
        "errors": []
    }

You can now send your first test RCS message.

Request and Test number status

The following requestStatus are available:

  • PENDING: Request is accepted and is in progress.
  • REJECTED: Request is rejected. An error occurred when processing the request.
  • COMPLETED: Request is successfully completed.

The following testNumberStatus are available:

  • WAITING_FOR_TESTER_ACCEPTANCE: Waiting for the user to accept the request to become a tester.
  • APPROVED: User has accepted to become a tester. Test messages can be sent to that number.
  • EXPIRED: If the user does not accept the invitation within 24 hours, the status of the test number is changed to EXPIRED.
  • UNSUPPORTED: Test number is not supported for RCS traffic.
  • FAILED: Failed because an internal service error occurred when processing the request. Contact the Infobip Support (opens in a new tab) team.

Supported content types

The RCS APIs support the following content types:

  • image/jpeg
  • image/jpg
  • image/gif
  • image/png
  • audio/aac
  • audio/mp3
  • audio/mpeg
  • audio/mpg
  • audio/mp4
  • audio/mp4-latm
  • audio/3gpp
  • application/ogg
  • audio/ogg
  • video/h263
  • video/m4v
  • video/mp4
  • video/mpeg
  • video/mpeg4
  • video/webm
  • application/pdf

Send a Text message

Use the following request:

curl -X POST https://api.infobip.com//rcs/2/messages \
-H 'Authorization: App {YOUR_API_KEY}'\
-H 'Content-Type: application/json' \
{
  "messages": [
    {
      "sender": "{YOUR_SENDER}",
      "destinations": [
        {
          "to": "{YOUR_DESTINATION}"
        }
      ],
      "content": {
        "text": "Tutorial test",
        "type": "TEXT"
      }
    }
  ]
}

If the API request is successful, you will receive a response with a 200 OK status that contains a bulk ID, message ID, status, and destination.

{
    "bulkId": "17410073165653388351152",
    "messages": [
        {
            "messageId": "17410073165653388351153",
            "status": {
                "groupId": 1,
                "groupName": "PENDING",
                "id": 26,
                "name": "PENDING_ACCEPTED",
                "description": "Message sent to next instance"
            },
            "destination": "{YOUR_DESTINATION}"
        }
    ]
}

Send a File message (PDF)

Use the following request:

curl -X POST https://api.infobip.com//rcs/2/messages \
-H 'Authorization: App {YOUR_API_KEY}'\
-H 'Content-Type: application/json' \
{
  "messages": [
    {
      "sender": "{YOUR_SENDER}",
      "destinations": [
        {
          "to": "{YOUR_DESTINATION}"
        }
      ],
      "content": {
        "file": {
          "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
        },
        "type": "FILE"
      }
    }
  ]
}

If the API request is successful, you will receive a response with a 200 OK status that contains a bulk ID, message ID, status, and destination.

Send a File message (Audio)

Use the following request:

curl -X POST https://api.infobip.com//rcs/2/messages \
-H 'Authorization: App {YOUR_API_KEY}'\
-H 'Content-Type: application/json' \
{
  "messages": [
    {
      "sender": "{YOUR_SENDER}",
      "destinations": [
        {
          "to": "{YOUR_DESTINATION}"
        }
      ],
      "content": {
        "file": {
          "url": "https://www.computerhope.com/jargon/m/example.mp3"
        },
        "type": "FILE"
      }
    }
  ]
}

If the API request is successful, you will receive a response with a 200 OK status that contains a bulk ID, message ID, status, and destination.

Send a File message (Video)

Use the following request:

curl -X POST https://api.infobip.com//rcs/2/messages \
-H 'Authorization: App {YOUR_API_KEY}'\
-H 'Content-Type: application/json' \
{
  "messages": [
    {
      "sender": "{YOUR_SENDER}",
      "destinations": [
        {
          "to": "{YOUR_DESTINATION}"
        }
      ],
      "content": {
        "file": {
          "url": "https://cdn-web.infobip.com/uploads/2025/02/RCS%20Business%20Messaging%20product%20video(1).mp4"
        },
        "thumbnail": {
          "url": "https://i.postimg.cc/W3g3G96P/Infobip-Logo-80kb.png"
        },
        "suggestions": [
          {
            "text": "Find out more",
            "postbackData": "more",
            "type": "REPLY"
          }
        ],
        "type": "FILE"
      }
    }
  ]
}

If the API request is successful, you will receive a response with a 200 OK status that contains a bulk ID, message ID, status, and destination.

Send a Card message

Use the following request:

curl -X POST https://api.infobip.com//rcs/2/messages \
-H 'Authorization: App {YOUR_API_KEY}'\
-H 'Content-Type: application/json' \
{
  "messages": [
    {
      "sender": "{YOUR_SENDER}",
      "destinations": [
        {
          "to": "{YOUR_DESTINATION}"
        }
      ],
      "content": {
        "orientation": "HORIZONTAL",
        "alignment": "LEFT",
        "content": {
          "title": "Rich card tutorial title",
          "description": "Rich card tutorial description",
          "media": {
            "file": {
              "url": "https://i.postimg.cc/QdpVWNsd/Infobip-Demo.png"
            },
            "height": "TALL"
          },
          "suggestions": [
            {
              "text": "Web page",
              "postbackData": "Web page",
              "url": "https://www.infobip.com/rcs",
              "type": "OPEN_URL"
            },
            {
              "text": "Find out more",
              "postbackData": "more",
              "type": "REPLY"
            }
          ]
        },
        "type": "CARD"
      }
    }
  ]
}

If the API request is successful, you will receive a response with a 200 OK status that contains a bulk ID, message ID, status, and destination.

Send a Carousel message

Use the following request:

curl -X POST https://api.infobip.com//rcs/2/messages \
-H 'Authorization: App {YOUR_API_KEY}'\
-H 'Content-Type: application/json' \
{
  "messages": [
    {
      "sender": "{YOUR_SENDER}",
      "destinations": [
        {
          "to": "{YOUR_DESTINATION}"
        }
      ],
      "content": {
        "orientation": "HORIZONTAL",
        "alignment": "LEFT",
        "content": {
          "title": "Rich card tutorial title",
          "description": "Rich card tutorial description",
          "media": {
            "file": {
              "url": "https://i.postimg.cc/QdpVWNsd/Infobip-Demo.png"
            },
            "height": "TALL"
          },
          "suggestions": [
            {
              "text": "Web page",
              "postbackData": "Web page",
              "url": "https://www.infobip.com/rcs",
              "type": "OPEN_URL"
            },
            {
              "text": "Find out more",
              "postbackData": "more",
              "type": "REPLY"
            }
          ]
        },
        "type": "CARD"
      }
    }
  ]
}

If the API request is successful, you will receive a response with a 200 OK status that contains a bulk ID, message ID, status, and destination.

Additional resources

Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary
Service status

Copyright @ 2006-2025 Infobip ltd.

Service Terms & ConditionsPrivacy policyTerms of use