The API to send a text message.
Unimsgs API Docs (1.0.0)
API requests are authenticated using Bearer Token. The Token can be obtained from the API Key associated with the appropriate service.
Browse to Services from the side bar in the portal and then select the service you want to use. Click on the API Keys tab to manage the API Keys and their tokens.
https://api.unimsgs.com/
Messaging
Unimsgs supports sending various types of messages across multiple channels (Ominichannel messages), including SMS, email, WhatsApp, and Telegram.
One important aspect of ominichannel messages is the ability to address different destionation addresses for the target channels.
Unimsgs uses the channels format that addresses the destination of each channel and will override the default destination address.
The format is '{default address};{channel1}:{address1};{channel2}:{address2}'
The following are some examples:
'to': '
966501234567': Descibes a (To) parameter with a default value that should be used for all channels.'to': '
966501234567;email:john@example.com': Descibes a (To) parameter with a default value that will be overriden with 'john@example.com' for email channels.
The number or text that will appear to the recipient as the sender of the message.
The receipient's destination address. It is usually the recipient's phone number or channel address. This parameter supports the channels format to descibe a destination address for each channel.
The type of the message. If the type is not specified, it will default to 'text'.
The text of the message. The text can be in any language.
The options to overide the message content and use the content from a predefined template.
A custom identifier provided by the client. The referenceId will be associated with the same message and allows clients to track and link specific messages across multiple interactions.
https://api.unimsgs.com/v1/messaging/{serviceId}/message
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.unimsgs.com/v1/messaging/{serviceId}/message' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"from": "Unimsgs",
"to": "9665XXXXXXX",
"text": "This is a text message"
}'{ "jobId": "string", "attempts": 0, "gateway": "string", "gatewayId": "string", "to": "string", "channel": "string" }