Skip to content
PaalChat Docs

Record consent

.md
PUT
https://whatsapp.paaltech.org/api/v1/businesses/{external_id}/contacts/{id}/consents/{category}

Token ability: contacts.write ยท Authentication

Record an opt-in you collected (granted) or an opt-out (revoked). Business-initiated templates in a revoked category are refused with recipient_opted_out. Every change is kept in the contact's consent history and announced as contact.consent. Contacts also opt out of marketing and notifications by replying STOP, and back in with START.

Path parameters

external_id string required

Your own ID for the business (Multi-SKUUL - the tenant ID).

Max 191 characters. Pattern ^[A-Za-z0-9._:-]+$.

id integer required
category string required

One of: marketing, notifications, transactional.

Body parameters

status string required

One of: granted, revoked.

source string | null

Where it came from, e.g. signup_form (default api).

Max 24 characters.

note string | null

Max 191 characters.

Responses

200

The contact's consent and preferences now.

401

unauthenticated - missing, invalid, revoked or expired token

403

missing_ability, product_suspended or product_token_required

404

not_found - not yours, or does not exist

422

validation_failed - fields are invalid; see errors.

429

rate_limited - over 300 requests/minute for this product

Errors always look like {"error": {"code", "message"}} - see Errors and status codes.