Suppressions
Emails blocked from sending (bounces, unsubscribes) (`publiq.suppressions`).
The suppressions resource keeps the list of addresses that must never receive email: add one manually (e.g. a GDPR request), list the organization suppressions and remove an address you trust again.
Method reference
suppressions.create
suppressions.create(params) → Promise<Suppression>Adds an address to the organization suppression list, blocking future sends to it.
| Parameter | Type | Description |
|---|---|---|
emailRequired | string | The address to suppress. |
reasonOptional | string | One of manual, bounce, complaint, unsubscribe (default manual). |
Returns: The created suppression — { object: "suppression", email, reason, ... }.
const suppression = await publiq.suppressions.create({
email: 'ana@example.com',
reason: 'manual',
});
console.log(suppression.email, suppression.reason);cc/bcc is silently dropped and, if all to are suppressed, the send is marked failed. See Deliverability.create for manual suppressions (e.g. a GDPR request) and delete to re-enable an address you trust again.suppressions.list
suppressions.list({ limit?, after? }) → Promise<SuppressionList>Lists the organization suppressions, cursor-paginated.
| Parameter | Type | Description |
|---|---|---|
limitOptional | number | Items per page (default 20, max 100). |
afterOptional | string | Cursor: id of the last item on the previous page. |
Returns: List envelope { object: "list", data: Suppression[] }. Use the last item id as after on the next call.
const { data } = await publiq.suppressions.list({ limit: 50 });
// next page:
const next = await publiq.suppressions.list({ after: data[data.length - 1].id });id in after until data comes back empty. See Errors & pagination.suppressions.delete
suppressions.delete(email) → Promise<void>Removes an address from the suppression list, allowing it to receive emails again.
| Parameter | Type | Description |
|---|---|---|
emailRequired | string | The suppressed address to remove. |
Returns: No content (204).
await publiq.suppressions.delete('ana@example.com');DELETE /suppressions/{email} path — you do not need to escape it yourself.Examples show Node, Python and PHP. In Python methods are snake_case (e.g. cancel_run, from_spec) and take a dict; in PHP they are camelCase and take an associative array. Body keys are always camelCase (templateKey, firstName, scheduledAt) — API responses come back in snake_case.