Rivier/ Reference/ voice

Record how and where a person agreed to receive messages

post/phone/opt-in

Record how and where a person agreed to receive messages. Needed before marketing and before a WhatsApp template to someone who has not written first.

Before you call

Credential
Authorization: Bearer $KEY
Scope
voice:write
Mcp
rivier_phone_opt_in
Graphql
Mutation.voicePhoneContactOptIn
Sdk
voice.phoneContact.optIn
Cli
voice phone contact opt in

Request bodyapplication/json, required

  • peerstringrequired
    Pattern: ^+\d{6,15}$.
  • channelstring
    One of: sms, mms, whatsapp. Default: sms.
  • sourcestringrequired
    At most 300 characters.

Responses

  • 200application/json
    Success
    • idstringrequired
    • channelstringrequired
      One of: sms, mms, whatsapp.
    • peerstringrequired
    • optedInbooleanrequired
    • optInSourcestringrequired
    • optInAtstring or nullrequired
    • optedOutAtstring or nullrequired
    • lastInboundAtstring or nullrequired
  • 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