Record the tenant's consent and enable template analytics at Meta
POST/api/channels/:channel/whatsapp/template-analytics/consent
The only place the is_enabled_for_insights switch is thrown. Requires
BOTH acknowledgements explicitly — agreement to the collection, and
agreement to the fact that it cannot be undone — because a single
checkbox lets a reader tick past the sentence that actually matters.
Meta is called first and the record written only if Meta accepted: a consent record for a switch that was never thrown would let an auditor conclude a tenant's chats are being harvested when they are not.
The grant is stored append-only with the actor's name, email, IP and the
version of the wording shown, and mirrored onto the channel's event
timeline. Admin-gated (Channel update).
Request
Responses
- 201
- 409
- 422
Consent recorded and insights enabled.
This account has already consented; Meta offers no way to repeat or undo it.
An acknowledgement was missing (ValidationError), or Meta refused
(WhatsAppInsightsRefusal). A refusal carries a code naming the
cause, a localized message saying what to do, and Meta's own answer
under meta — nothing is recorded and nothing changes at Meta.