API reference

Email suppressions

Manage email suppression lists.

get/v1/email-suppressions

List suppressed email addresses

Permissionemail_suppressions:rNode.js SDKhonkio.suppressions.list()

Newest first. Filter with reason (hard_bounce, complaint, unsubscribe or manual) and page with limit (default 50, up to 100) and cursor.

Requires email_suppressions:r.

Responses

  • 401Missing, invalid, revoked or expired API key.The standard error body.
  • 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
  • 403The API key lacks the permission this operation requires, or the account is suspended or closed.The standard error body.
  • 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
  • 500Unexpected server error.The standard error body.

Example

const { data, error } = await honkio.suppressions.list({ reason: 'hard_bounce' })
if (error) throw new Error(error.message)
for (const s of data.data) console.log(s.email_address, s.created_at)
post/v1/email-suppressions

Suppress an email address

Permissionemail_suppressions:wNode.js SDKhonkio.suppressions.create()

Adds the address to the suppression list with the reason manual. A send to a suppressed address is refused with EMAIL_SUPPRESSED.

Requires email_suppressions:w.

Request body

The address to block.

FieldTypeDescription
email_addressrequiredstring

The address. No email is sent to it again until you remove it.

  • Format: email
reasonrequiredstring

Always manual: bounces, complaints and unsubscribes are added automatically.

  • One of: manual

Responses

  • 401Missing, invalid, revoked or expired API key.The standard error body.
  • 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
  • 403The API key lacks the permission this operation requires, or the account is suspended or closed.The standard error body.
  • 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
  • 500Unexpected server error.The standard error body.

Example

const { error } = await honkio.suppressions.create({ emailAddress: 'sam@example.com' })
if (error) throw new Error(error.message)
delete/v1/email-suppressions/{address}

Remove an address from the suppression list

Permissionemail_suppressions:dNode.js SDKhonkio.suppressions.remove()

Answers 204, or 404 when the address is not suppressed.

Requires email_suppressions:d.

Parameters

ParameterTypeDescription
addressrequiredpathstring

Responses

  • 401Missing, invalid, revoked or expired API key.The standard error body.
  • 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
  • 403The API key lacks the permission this operation requires, or the account is suspended or closed.The standard error body.
  • 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
  • 500Unexpected server error.The standard error body.

Example

const { error } = await honkio.suppressions.remove('sam@example.com')
if (error) throw new Error(error.message)