Via the Mail API you can send not only SMS but also RCS messages by email.
Requirement: You have set up a Mail API configuration and have an RCS agent whose sender name you use. How address, recipient and patterns work in general is described in the article Sending SMS via email.
Set the message type to RCS
In the Settings step of the configuration, set the Type to RCS. All mails to this configuration are then sent as RCS messages.
If you want to choose the type per mail, capture it with the variable {{type}} in a pattern, e.g. in the subject pattern type={{type}}. A mail with the subject type=rcs is then sent as RCS, even if SMS is set in the configuration.
Please note: For RCS messages you can only use the sender names you specified when creating your agents.
Content of the RCS message
Simple text
For a plain text message, write the text in the mail where your {{text}} pattern expects it. With the default setting, this is the entire mail text.
Complex message
For complex RCS messages, for example with cards or buttons, pass the JSON code of the RCS object as the message text instead of plain text.
Classic format (legacy configurations)
For configurations marked Legacy in the dashboard, you control sending via the recipient line and the subject:
- Recipient: phone number before
@gateway.seven.io, e.g.012345678910@gateway.seven.io. Withto=in the subject you override the recipient line, e.g. for groups. - Subject: here you must specify the parameter
type=rcs, otherwise the message is sent as SMS. Separate further parameters with spaces. - Content: text or JSON code in the mail text. With double hashes (
##This is your text##) you make sure that no mail signature is sent along.
You can find all parameters in the Mail API documentation.