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
- peerstringrequiredPattern: ^+\d{6,15}$.
- channelstringOne of: sms, mms, whatsapp. Default: sms.
- sourcestringrequiredAt most 300 characters.
Responses
- 200application/jsonSuccess
- idstringrequired
- channelstringrequiredOne of: sms, mms, whatsapp.
- peerstringrequired
- optedInbooleanrequired
- optInSourcestringrequired
- optInAtstring or nullrequired
- optedOutAtstring or nullrequired
- lastInboundAtstring or nullrequired
- 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