Skip to main content

UC-002 — Send RCS Rich Card

FieldValue
IDUC-002
GoalSend an RCS rich card with media, text, and interactive actions
ChannelRCS
ComplexityBasic
Estimated time15 minutes
APIs involvedPOST /api/message-server/rcs/send, GET /api/partner-gateway/v1/messages/status/{customerMessageId}

Real-world scenarios

  • Retail — Product promotion: ElettroShop sends a rich card with a product photo, discounted price, and a "Buy now" button linking directly to the offer page.
  • Restaurant — Visual menu: Trattoria Da Mario sends the daily special with a dish photo, description, and a button to book a table.
  • Real estate — Property listing: Immobiliare Rossi sends a card with an apartment photo, details, and buttons to call the agent or open the map.

Prerequisites

Before you begin, make sure you have:

:::tip Test without costs Add "simulation": true in the request body to validate the flow without actually sending messages and without consuming credit. :::

Message flow

Unlike an SMS, the RCS rich card allows you to send multimedia content with interactive buttons directly in the phone's native conversation, without the need for external apps.

Step 1 — Prepare the media URL

The rich card image must be accessible via a public HTTPS URL. Supported formats: JPEG, PNG. Recommended size: at least 1440px wide for optimal rendering.

:::tip Media requirements The URL must be publicly reachable (no localhost, no VPN). Use a CDN or object storage (S3, GCS) to ensure availability and performance. :::

Step 2 — Send the Rich Card

Call the RCS endpoint with type: "CARD" and the card content in the body field.

curl -X POST https://lora-api.agiletelecom.com/api/message-server/rcs/send \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{
"destination": "+393401234567",
"agentId": 10,
"body": {
"type": "CARD",
"body": {
"title": "Samsung Galaxy S26 Ultra",
"description": "Offerta esclusiva ElettroShop! Solo per oggi: Galaxy S26 Ultra a 899 EUR invece di 1.199 EUR. Spedizione gratuita e reso entro 30 giorni.",
"mediaUrl": "https://cdn.elettroshop.it/products/galaxy-s26-ultra.jpg",
"suggestions": [
{
"type": "URL",
"text": "Acquista ora",
"value": "https://elettroshop.it/galaxy-s26-ultra?promo=RCS2026"
},
{
"type": "REPLY",
"text": "Maggiori info",
"value": "INFO_GALAXY_S26"
},
{
"type": "DIAL",
"text": "Chiama negozio",
"value": "+390212345678"
}
]
}
},
"enableNotification": true
}'

Response — Message accepted

{
"messageId": "e76614d1-4ac1-4d94-89f0-d07f1b5a190c",
"simulation": false,
"results": {
"rcs": {
"accepted": true,
"reasons": []
},
"sms": null
}
}
Behind the scenes — Rich Card structure

The RCS rich card is composed of:

  • title (required): Main title of the card, displayed in bold.
  • description (optional): Descriptive text below the title.
  • mediaUrl (optional): URL of the image or video displayed at the top of the card.
  • suggestions (optional): List of interactive buttons. Supported types:
    • URL — Opens a link in the browser
    • REPLY — Sends a predefined reply (the value is the payload received via the INBOUND webhook)
    • DIAL — Starts a phone call to the specified number

The gateway verifies the reachability of the mediaUrl at the time of sending. If the image is not accessible, the message is still sent but without media.

Available suggestion types

TypeBehaviorExample value
URLOpens the browserhttps://example.it/page
REPLYSends a reply to the botINFO_PRODUCT_42
DIALStarts a call+390212345678

Step 3 — Verify delivery

curl -X GET "https://lora-api.agiletelecom.com/api/partner-gateway/v1/messages/status/e76614d1-4ac1-4d94-89f0-d07f1b5a190c?channel=RCS" \
-H "X-Api-Key: YOUR_API_KEY"

Response — Delivered

{
"customerMessageId": "e76614d1-4ac1-4d94-89f0-d07f1b5a190c",
"channel": "RCS",
"destination": "+393401234567",
"deliveryStatus": "DELIVERED",
"deliveryStatusDescription": "Message delivered",
"sendDate": "2026-04-09T11:30:00+02:00",
"deliveryDate": "2026-04-09T11:30:02+02:00",
"readDate": "2026-04-09T11:31:15+02:00"
}

:::info Read receipt Unlike SMS, RCS supports read receipts (readDate). The READ webhook is sent when the user views the message. :::

Behind the scenes — RCS delivery and read webhooks

For RCS you receive two types of callbacks:

DELIVERY — The message has been delivered:

{
"channel": "RCS",
"eventType": "DELIVERY",
"messageId": "e76614d1-4ac1-4d94-89f0-d07f1b5a190c",
"destination": "+393401234567",
"statusCode": 3,
"description": "delivered",
"eventDate": "2026-04-09T11:30:02Z"
}

READ — The user has viewed the message:

{
"channel": "RCS",
"eventType": "READ",
"messageId": "e76614d1-4ac1-4d94-89f0-d07f1b5a190c",
"destination": "+393401234567",
"eventDate": "2026-04-09T11:31:15Z"
}

INBOUND — The user pressed a REPLY button:

{
"channel": "RCS",
"eventType": "INBOUND",
"messageId": "inbound-msg-001",
"source": "+393401234567",
"destination": "+393209998877",
"receivedDate": "2026-04-09T11:32:00Z",
"messageType": "TEXT",
"text": "INFO_GALAXY_S26"
}

Configure your endpoint in the Webhook guide.

SMS Fallback configuration

If the recipient does not support RCS, you can enable automatic SMS fallback by setting maxSmsParts:

curl -X POST https://lora-api.agiletelecom.com/api/message-server/rcs/send \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{
"destination": "+393401234567",
"agentId": 10,
"body": {
"type": "CARD",
"body": {
"title": "Offerta ElettroShop",
"description": "Galaxy S26 Ultra a 899 EUR. Spedizione gratuita!",
"mediaUrl": "https://cdn.elettroshop.it/products/galaxy-s26-ultra.jpg",
"suggestions": [
{
"type": "URL",
"text": "Acquista ora",
"value": "https://elettroshop.it/galaxy-s26-ultra"
}
]
}
},
"maxSmsParts": 3,
"enableNotification": true
}'

Response — SMS fallback activated

{
"messageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"simulation": false,
"results": {
"rcs": {
"accepted": false,
"reasons": ["RCS not available"]
},
"sms": {
"accepted": true,
"unicode": false,
"parts": 1,
"reasons": []
}
}
}

:::warning Fallback and content When SMS fallback is triggered, the rich card content (images, buttons) is lost. The gateway sends only text. For a better experience, consider also configuring a custom fallback text. :::

Common errors

Invalid agentId

{
"status": "fail",
"data": {
"agentId": "Agent not found or not associated with your account"
}
}

Solution: Verify the agentId in the RCS section of the platform dashboard. Each account has an associated RCS agent.

Unreachable media URL

The message is accepted (accepted: true) but the card arrives without an image. Verify that the URL is:

  • HTTPS (not HTTP)
  • Publicly accessible
  • A valid image format (JPEG, PNG)

Expected result

StepActionResult
1Prepare media URLImage accessible via HTTPS
2POST /rcs/send (type: CARD)messageId returned, accepted: true
3GET /messages/status/{id}deliveryStatus: "DELIVERED", readDate present

Next steps