Send RCS message
POST/message-server/rcs/send
Sends an RCS message. The content can be:
- An inline body (
body) with type TEXT, CARD, or CAROUSEL - A template (
templateId)
The body and templateId fields are mutually exclusive: one of the two is required.
Fallback: If the message cannot be delivered via RCS, the system can fall back to WhatsApp and/or SMS. The fallbacks belong to the RCS content: with an inline body, set fallbackSms (RCS → SMS) and optionally fallbackWhatsApp (RCS → WhatsApp → SMS) inside body.body; with templateId, the fallbacks saved in the template apply. If fallbackWhatsApp is present, fallbackSms is mandatory. The WhatsApp fallback applies only if your account supports mixed-channel sending; otherwise it is ignored.
A maxSmsParts field, if sent, is ignored: the fallback SMS is split into as many parts as its text needs.
Request
Responses
- 202
- 400
- 401
- 500
- 511
Request accepted. Check results.rcs.accepted to verify whether the message was accepted.
Note: accepted: true means the message was accepted for sending, not that it was delivered. Delivery confirmation arrives via webhook.
When the content has fallbacks, results also carries whatsapp and/or sms: those messages are prepared now and sent only if the previous channel fails. In that case results.rcs.accepted is always true, and only the SMS can be rejected at this stage. Results of the channels not involved are omitted, and so is reasons when the message is accepted.
Invalid request. Fields that fail validation are listed in data, one list of messages per invalid object; a body that cannot be read gives data: "Invalid request body". An agent, template or WhatsApp number that your account cannot use gives message and code instead.
Missing or invalid credentials. The body is empty.
Unexpected error while handling the message
The calling IP address is outside the IP ranges configured for your account