List marketing consent
Keyset-paginated list of the org's current marketing-consent states, filterable by state, purpose, and email substring. Requires mail.read.
query Parameters
limitPage size. Values above the server-side cap are clamped (standard default 50, cap 200; a few document-heavy lists use larger windows). Invalid values fall back to the default.
cursorOpaque continuation token from the previous response's pagination.cursor. Omit for the first page. Cursors are stateless and do not expire, but are only valid for the list and filters that produced them.
stateFilter by state: opted_in|soft_opt_in|opted_out|unknown.
purposeFilter by consent purpose; defaults to all.
emailCase-insensitive substring match on the recipient address.
sortOrdering: updated_at, email, state, basis or source, each with an optional :asc/:desc suffix (default updated_at:desc). An unknown value is rejected. email orders by lower(email), the key consent is unique on. source is nullable: rows without one are grouped together and sort last ascending, first descending. Cursors are bound to the ordering that issued them, so changing sort mid-walk needs a fresh first page.
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
List marketing consent › Responses
OK
Record a recipient's consent
Records ONE recipient's marketing-consent state with proof rules — never a bulk opt-in. Recording opted_in REQUIRES proof_text: without it the call is refused with 422 CONSENT_PROOF_REQUIRED rather than quietly recorded as unknown (send state=unknown for that). soft_opt_in cannot be set by hand. The change is appended to the demonstrability record. Requires mail.consent.manage.
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
Record a recipient's consent › Request Body
emailThe recipient address (required).
stateThe state to record: opted_in | opted_out | unknown. soft_opt_in is not manually settable (it is seeded from sales).
customer_idThe customer this address belongs to, when known.
proof_textThe consent statement the recipient agreed to. Required to record opted_in; without proof an opt-in lands as unknown (§4.1).
purposeConsent purpose; defaults to marketing_email.
Record a recipient's consent › Responses
OK
List marketing-consent transitions
The append-only log of marketing-consent changes: what each state moved from and to, who moved it, and the evidence that change carried (the statement agreed to, the IP, the user agent). This is the record GDPR Art 7(1) demonstrability is served from — the current state alone cannot show what changed when. Filter by email to get one recipient's trail. Keyset-paginated, newest first. Requires mail.read.
query Parameters
limitPage size. Values above the server-side cap are clamped (standard default 50, cap 200; a few document-heavy lists use larger windows). Invalid values fall back to the default.
cursorOpaque continuation token from the previous response's pagination.cursor. Omit for the first page. Cursors are stateless and do not expire, but are only valid for the list and filters that produced them.
emailFilter to one exact recipient address (case-insensitive). This is the usual call: the history is opened from a single permission row.
purposeFilter by consent purpose; defaults to all.
customer_idFilter to one customer's transitions.
Headers
X-Workspace-IdSelects the workspace this request operates in, by workspace UUID or slug (e.g. a sandbox workspace for test integrations). Omitted: the organization's default live workspace. Unknown workspace: 404; workspace outside your organization: 403. Discover workspaces via GET /workspaces.
Workspace UUID or slug.
List marketing-consent transitions › Responses
OK