Send a text, a picture message or a WhatsApp message
post/phone/messages
Send a text, a picture message or a WhatsApp message. Checks opt-out, agreement, the WhatsApp window, the country's rules and the plan allowance first, and refuses with a plain reason and the next step rather than dropping anything. Marketing needs the person's recorded agreement.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
voice:write- Mcp
rivier_phone_send- Graphql
Mutation.voicePhoneMessageSend- Sdk
voice.phoneMessage.send- Cli
voice phone message send
Request bodyapplication/json, required
- tostringrequiredPattern: ^+\d{6,15}$.
- channelstringOne of: sms, mms, whatsapp.
- bodystringAt most 1600 characters.
- mediaUrlslist of string (uri)
- templateIdstringAt most 80 characters.
- variablesobject
- senderIdstringAt most 80 characters.
- serviceIdstringAt most 80 characters.
- purposestringOne of: service, marketing.
- idempotencyKeystringAt most 120 characters.
Responses
- 201application/jsonSuccess
- idstringrequired
- channelstringrequiredOne of: sms, mms, whatsapp.
- directionstringrequiredOne of: out, in.
- peerstringrequired
- ownstringrequired
- bodystringrequired
- medialist of stringrequired
- statestringrequired
- codestring or nullrequired
- detailstring or nullrequired
- segmentsnumberrequired
- templateIdstring or nullrequired
- atstringrequired
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring