Data · Consent
Manage consent via API
Managing consent programmatically: the subscription-manage operations (suppress, reactivate, opt-out, opt-in), why every operation is per channel, the SMS/RCS exception, and how connected apps declare a compliance policy that Instasent enforces.
Consent isn't only set by hand from the contact profile — it can also be managed programmatically. That said, the same four operations exist on both sides — the panel and the API — so this page isn't a list of "API-only" actions. What it covers is which operations exist, who is authorized to perform each, and how connected apps stay compliant without you having to do anything.
The four operations
Consent is changed through the subscription-manage action, which exposes four
operations:
| Operation | Effect | Axis |
|---|---|---|
| suppress | Blocks the contact from all marketing on the channel (sets suppression). | Channel suppression |
| reactivate | Removes the block; brings the contact back. | Channel suppression |
| opt-out | Records that the contact declined marketing. | Marketing preference |
| opt-in | Records that the contact accepted marketing. | Marketing preference |
These map directly onto the two axes:
opt-out / opt-in move the marketing preference, suppress / reactivate move the
suppression state.
Always per channel — with the SMS/RCS exception
Every operation targets one channel. Opting a contact out of SMS does not touch their WhatsApp consent. The one exception is the shared SMS/RCS consent: acting on SMS also affects RCS, because they're a single state (see Shared consent).
Not "API-only": subscription management versus the contact's replies
All four operations are available in the panel too — from the Channel preferences card on the contact profile. Consent changes in two ways, and they don't behave the same:
- Subscription management — your team in the panel, the API, or a flow's consent step.
It performs exactly the operation you ask for, on one channel, and changes nothing else:
opt-outon a contact who had already declined leaves them declined, andopt-inon a suppressed contact leaves them suppressed. To bring back a suppressed contact who has accepted marketing again, runreactivateand thenopt-in. - The contact's own replies — a STOP or START reply, or an unsubscribe link. These reach suppression too, depending on the message and the contact's state. A STOP or an unsubscribe-link tap on a message sent under the Basic policy suppresses the channel straight away, and so does a repeated opt-out from a contact who had already declined marketing. A START from a suppressed contact accepts marketing and lifts the suppression, in one step.
So the meaningful distinction isn't "panel versus API", and it isn't who may suppress or reactivate: a contact can do both with their own replies. It's that subscription management records exactly the change you choose, while a contact's reply is resolved by the consent rules. Those rules are in Opt-outs & reactivation.
Connected apps and the compliance policy
When a connected app or AI agent sends on your behalf, it doesn't apply consent rules itself
— it declares a compliance policy per send, and Instasent enforces it: it
excludes the contacts the policy filters out, and applies the opt-out consequence
automatically. The policy is one of basic, no-opt-out or opt-in. If a direct
project-API send omits it, Instasent defaults to basic — which always respects
suppressions.
Each policy excludes a different set of contacts at send time:
compliancePolicy | Excludes at send |
|---|---|
basic | Suppressed contacts only. |
no-opt-out | Suppressed contacts and those who opted out. |
opt-in | Suppressed, opted out and those with no preference (only explicit opt-ins receive). |
It is the same setting as a campaign's Consent policy — the three policies are the same
three. no-opt-out is the value the dashboard shows as No opt-out; it used to be called
opt-out, and the API still accepts that older value on input for compatibility, always
returning no-opt-out. The campaign-side view, including what a STOP does under each, is in
Compliance policies.
Where the technical contract is documented
This page is the consent model behind the operations. The request and response shapes, the endpoints and authentication for managing consent and sending with a compliance policy belong to the developer documentation — see the Connected apps overview for the panel-side picture, and the Product API reference for the contract itself.
Last updated