Send an immediate SMS to your contacts
with or without parameters,
with or without attachments.
The sending can be done synchronously – this is the default mode.
Or asynchronously – in this case you will only get the “queued” response and sending will be done later with a background service.
POST /transactional/SMS/send
Request URL:
https://api.inwise.com/rest/v1/transactional/sms/send
Example 1 – Simple send, sync mode
{
"message": {
"content": "BODY of the message",
"charset": "unicode",
"to": [
{
"mobile_number": "972-54-1111111"
}
]
}
}
Example 2 – Send, with async mode
{
message: {
content: "Hi",
charset: "unicode",
unsubscribe_text: "Click to unsubscribe: ",
add_unsubscribe_link: true,
add_unsubscribe_sms_reply: true,
to: [
{
"mobile_number": "972-54-1111111"
}
]
}
,
"async": true,
"send_at": "2020-01-20 13:05:00+02:00"
}
Example 3 – Send to kosher number
{
message: {
content: "Hi. ",
charset: "unicode",
unsubscribe_text: "remove: ",
add_unsubscribe_link: true,
add_unsubscribe_sms_reply: true,
to: [
{
"mobile_number": "972-58-32XXXXX"
}
]
}
,
"async": true,
}
Example 4 – More attributes
{
"message": {
"content": "Hi #field1#,
your package was just sent.
track link: www.google.com
etc.
",
"to": [
{
"mobile_number": "972-54-111111"
}
],
"track_clicks": true,
"field_vars": [{
"rcpt": "972-54-XXXXXXX",
"fields": [{
"name": "field1",
"content": "Hi",
"type": "string"
}]
}],
"tags": ["PackageMessage1"]
}
,
"async": true,
"send_at": "2020-01-20 13:05:00+02:00"
}
Response code
If everything goes well, you should get a success response code 200 – response url as the model schema
Response code 401 – response url = “you are not authorized to use rest API”
when send Async mode:
- “
queued“. final status and reject reason should be then retrieved from GET methods. - “
sent” (when ended with success) - “
invalid” (when error in the phone number) + “reject_reason”: “invalid-number” - “
rejected” (when refused sending for unsubscribe reason) + “reject_reason”: “unsubscribe” - “
rejected” (then number is marked as kosher – refused incoming message) + reject_reason”: “kosher-number” - “
queued“+ "reject_reason": “insufficient-funds” (when no credit to send) - “status”: “exception”+ “reject_reason”: “no-available-gateways” – when there is an internal technical problem with the gateway defined in your account
Only on Sync mode
* There are more reject reasons as: exception, invalid_mobile_number, bounced, unsubscribed, no_credit, cancelled_by_user, kosher_number
Get analytics
You can monitor the result of your Async send and Sync send:
- manually, in your inwise account, screen: Transactional Sent
- With webhook – https://developers.inwise.com/docs/webhook/transactional-webhook/
- With these methods:
GET /transactional/sms/info
GET /transactional/sms/search