Check a phone number for RCS
Answers 404 until MessageOS turns it on for you: GET /whoami shows rcsExtras true once it is. Asks the messaging network whether one phone can receive RCS from this agent, and what it supports, so you can check a number before you send to it.
- The number does not have to be a contact, and nothing is stored or sent.
- A phone that cannot receive RCS is not an error: the answer is 200 with rcs false.
- It needs messages:write, the scope of a send, because the check is made as your agent about a number you are about to message.
Scope: messages:write.
bearerAuthorizationBearer <mosc_...>A client key (mosc_).
phoneNumber*stringThe phone number to check, in E.164. It does not have to be a contact. In a query string, write the plus sign as %2B.
1 <= lengthWhat the messaging network says about this phone.
application/json- response
Whether one phone can receive RCS from this agent, and what it supports.
phoneNumber*stringThe number that was checked, in E.164.
rcs*booleantrue when this phone can receive RCS from this agent. false when the messaging network says it cannot. For an agent that has not launched, that is also the answer for a phone that is not one of its testers.
features*array<>What this phone supports, in the names this API uses: card and carousel are the message types, openUrl, dial, viewLocation, shareLocation, and createCalendarEvent are the suggested actions, and revoke means the phone allows a message to be taken back after it is delivered and before it is read. Empty when rcs is false.
Example request
curl 'https://api.messageos.ai/v1/capabilities?phoneNumber=%2B15555550123' \ -H 'Authorization: Bearer mosc_...'Example response
{ "phoneNumber": "+15555550123", "rcs": true, "features": [ "card", "carousel", "openUrl", "dial", "viewLocation", "shareLocation", "createCalendarEvent" ]}