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.

Parameters
ParameterTypeDescription
emailRequiredstringThe address to suppress.
reasonOptionalstringOne 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);
A suppressed address never receives email: Publiq filters per recipient at send time, so a suppressed cc/bcc is silently dropped and, if all to are suppressed, the send is marked failed. See Deliverability.
Bounces and complaints are usually added automatically by Publiq — use 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.

Parameters
ParameterTypeDescription
limitOptionalnumberItems per page (default 20, max 100).
afterOptionalstringCursor: 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 });
Listing is cursor-paginated: iterate by passing the last item 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.

Parameters
ParameterTypeDescription
emailRequiredstringThe suppressed address to remove.

Returns: No content (204).

await publiq.suppressions.delete('ana@example.com');
The SDK url-encodes the email when building the 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.

Suppressions — Publiq Docs