Block a customer
Stop every message you start to this customer from this number, until the block is lifted. The response is 201 when the block is new and 200 when the customer was already blocked, in which case the entry is returned unchanged.
Set up WhatsApp first. Connect a WhatsApp number in the dashboard or with Connect numbers. Included on every paid plan. See plans.
number_idrequiredThe customer's number in international format, such as +15551234567.
A note for your team.
curl -X POST 'https://backend.omnidim.io/api/v1/whatsapp/numbers/{number_id}/opt_outs' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "customer": "+15551234567", "note": "Asked to stop on the call." }'
{ "id": 0, "phone_number_id": 0, "customer": "+15551234567", "source": "instructed_keyword", "active": false, "opted_out_at": "string", "opted_in_at": "string", "note": "string" }
BearerAuthAuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
number_id*integerId of a WhatsApp number in your workspace, from
listWhatsappNumbers.
A number in another workspace answers 404.
application/jsoncustomer*stringThe customer's number in international format, such as +15551234567.
note?stringA note for your team.
length <= 500Response body
application/jsonThe customer was already blocked.
application/jsonid?integerphone_number_id?integercustomer?stringsource?stringHow the opt-out happened. instructed_keyword and
template_stop_button are the customer's own and only they can
lift them. meta_marketing_optout is a marketing choice made in
WhatsApp. manual is one you added.
"instructed_keyword""template_stop_button""meta_marketing_optout""manual"active?booleanopted_out_at?stringopted_in_at?stringWhen a lifted opt-out was lifted.
note?stringList opt-outs
Who opted out of messages from this number, oldest first. By default it lists active opt-outs only.
Lift a block
Lift a block you added, or a marketing block made in WhatsApp. The entry stays in the list with active: false. A customer's own STOP cannot be lifted over the API: only the customer lifting it in WhatsApp, or messaging you again, brings them back.
