Skip to content
Get started
Esc
Withdraw consent

Contacts

DELETE /v1/contacts/{phone}/consent

WhatsApp only

The customer no longer wants messages, and templates to their number fail the check again.

Path parameters

phone string required
The customer's number in E.164, with or without the +.

Errors

CodeHTTPWhat it means
invalid_phone422Give the number in international format, for example +77011234567.

Any request can also get the codes on Errors, such as unauthenticated and rate_limited.

Code language
// npm install @airboxhq/api
// AIRBOX_API_KEY=YOUR_API_KEY node consent_withdraw.mjs
import { Airbox } from "@airboxhq/api";

const client = new Airbox(process.env.AIRBOX_API_KEY);

const { data, error } = await client.contacts.withdrawConsent("+77011234567");

if (error) {
  throw new Error(`${error.code}: ${error.message} (${error.requestId})`);
}

console.log(data);
Response 200
{
    "phone": "+77011234567",
    "contact_id": "0199c5e2-1f0a-7a42-8d1e-5b7c9a2e4f10",
    "channel": "whatsapp",
    "granted": false,
    "recorded_at": "2026-10-09T09:30:00+00:00"
}