Rivier/ Reference/ voice

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

  • tostringrequired
    Pattern: ^+\d{6,15}$.
  • channelstring
    One of: sms, mms, whatsapp.
  • bodystring
    At most 1600 characters.
  • mediaUrlslist of string (uri)
  • templateIdstring
    At most 80 characters.
  • variablesobject
  • senderIdstring
    At most 80 characters.
  • serviceIdstring
    At most 80 characters.
  • purposestring
    One of: service, marketing.
  • idempotencyKeystring
    At most 120 characters.

Responses

  • 201application/json
    Success
    • idstringrequired
    • channelstringrequired
      One of: sms, mms, whatsapp.
    • directionstringrequired
      One of: out, in.
    • peerstringrequired
    • ownstringrequired
    • bodystringrequired
    • medialist of stringrequired
    • statestringrequired
    • codestring or nullrequired
    • detailstring or nullrequired
    • segmentsnumberrequired
    • templateIdstring or nullrequired
    • atstringrequired
  • 400application/json
    The request was malformed
    • errorstringrequired
    • messagestring
  • 401application/json
    No valid credential
    • errorstringrequired
    • messagestring
  • 403application/json
    The credential lacks the scope, origin or address
    • errorstringrequired
    • messagestring
  • 429application/json
    Over the key's rate limit; see Retry-After
    • errorstringrequired
    • messagestring

This page as Markdown