Suppressions — K8 HQ Content API
Suppressions operations for K8 HQ Content API. Requests, permissions and responses.
Before making requests, read the authentication and request requirements.
Addresses the organization's mail won't be sent to because mail to them bounced or was marked as spam, and taking an address off the list.
Addresses Amazon SES won't send the organization's mail to, because mail to them bounced permanently or the recipient marked it as spam. Each organization has its own list (its own SES tenant): it never shows or affects another organization's recipients. A send to a suppressed address is accepted, then bounces at once: the message's mail.delivery.bounced event has suppressed: true, and the sending inbox's members get a notice (at most one a day per inbox).
Base URL
| Base URL | For |
|---|---|
https://api.k8hq.com/v1 | API tokens and the K8 HQ web app |
Endpoints
Suppressions
List the organization's suppressed addresses
The addresses on the organization's suppression list, with why and since when (the last bounce or complaint that put them there). Access tokens with org:read; people signed in to the web app with org.events.read (owners and admins by default, ?org=). mayRemove says whether the caller may remove addresses that bounced (DELETE /suppressions/{address}).
For API tokens with org:read and the web app.
Parameters
| Name | Type | Description |
|---|---|---|
org (query) | string | The organization (org_). Required for a person signed in to the web app (any organization they're a member of); a token always answers for its own organization. |
cursor (query) | string | From the previous page's nextCursor. |
limit (query) | integer | Addresses per page, 1 to 1000 (default 100). |
Response body (JSON)
| Field | Type | Description |
|---|---|---|
mayRemove required | boolean | Whether the caller may remove addresses that bounced (a person with org.settings.change). |
suppressions required | Suppression[] | |
nextCursor | string | Present while there are more. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 200 | Suppressions | The suppressed addresses. |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not found, or not yours (not_found). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |
Remove an address that bounced
Takes an address off the organization's suppression list, so mail to it is sent again; if it still bounces, it's added back and counts toward the organization's bounce rate. Only addresses that bounced: a recipient who marked the organization's mail as spam stays suppressed (422 rejected) until they mark it as not spam (SES then removes them) or K8 HQ support removes them. Amazon SES may also hold an address on its own global list for a short time after a recent hard bounce; that clears by itself. People signed in to the web app with org.settings.change (owners by default), with a passkey used in the last 5 minutes (401 step_up_required otherwise); not for access tokens. Recorded as mail.suppression.removed (with the address's domain only).
For the web app. The session needs a recent passkey: if its last passkey confirmation is more than 5 minutes old, the answer is 401 step_up_required.
Parameters
| Name | Type | Description |
|---|---|---|
org (query) | string | The organization (org_). Required for a person signed in to the web app (any organization they're a member of); a token always answers for its own organization. |
Idempotency-Key (header) | string | Up to 255 characters; a retry with the same key gets the first response. |
address (path) required | string | The address exactly as the list shows it (SES matches case), URL-encoded. |
Responses
| Status | Body | Meaning |
|---|---|---|
| 204 | Removed. | |
| 400 | application/problem+json | The request is malformed (invalid). |
| 401 | application/problem+json | No token, or it expired: sign in again (unauthenticated). |
| 402 | application/problem+json | The organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit. |
| 403 | application/problem+json | The token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden). |
| 404 | application/problem+json | Not on the organization's list (or not its organization). |
| 409 | application/problem+json | A request with this Idempotency-Key is still running (in_progress). |
| 422 | application/problem+json | The recipient complained (marked mail as spam), so it can't be removed here (rejected). |
| 426 | application/problem+json | K8 HQ has been updated. Reload this page. |
| 429 | application/problem+json | Too many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response. |
| 503 | application/problem+json | Temporary failure; try again (unavailable). |