Check opt-out
check_opt_outCheck if a phone number is on this account's opt-out list for a channel and return opted_out true or false. Use before sending messages to skip blocked contacts instead of handling a refusal.
Instructions
Check whether ONE phone number is on this account's opt-out list for a channel (GET /api/v1/sms/opt-outs/{phone}) and return opted_out true or false. Call it before send_message to skip a blocked contact instead of handling the opted_out refusal. A number Vobiz has never seen is simply not opted out, so the answer is always definite. To list every blocked number use list_opt_outs; to change the list use add_opt_out or remove_opt_out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | No | sms (default; also covers mms), mms or rcs. | |
| phone_number | Yes | The number to check, E.164 (leading + optional). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True on success; false when the result is an error (then error, message and retryable are set). | |
| channel | No | Channel that was checked: sms, mms or rcs. | |
| opted_out | No | True when send_message would refuse this number on this channel. | |
| phone_number | No | The number, normalised to E.164. |