sendMessage #
Sends an SMS to every recipient using one of the registered SMS Envoi accounts. All recipients are sent in a single API call to SMS Envoi.
The SMS Envoi provider accepts the phoneNumber recipient type: each entry of recipients is an object with a to phone number in E.164 format.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/hermes/providers/smsenvoi/accounts/:accountId
Method: POSTOther protocols #
{
"controller": "hermes",
"action": "sendMessage",
"providerId": "smsenvoi",
"accountId": "<account id>",
"body": {
"recipients": ["+33600000000"],
"content": {
"message": "<sms content>"
},
"params": {
"from": "<sender>" // optional — overrides account default_sender
}
}
}Kourou #
kourou hermes:sendMessage -a providerId=smsenvoi -a accountId=<account id> --body '{
"recipients": ["+33600000000"],
"content": {
"message": "<sms content>"
},
"params": {}
}'Arguments #
providerId: provider identifier,smsenvoiaccountId: identifier of a registered SMS Envoi account
Body properties #
recipients: array of E.164 phone number strings (recipient typephoneNumber)content.message: SMS textparams.from: sender override (optional)
params is validated against the provider's messageAdditionalParamsSchema.
Response #
Returns an empty result on success.
{
"requestId": "d16d5e8c-464a-4589-938f-fd84f46080b9",
"status": 200,
"error": null,
"controller": "hermes",
"action": "sendMessage",
"result": null
}