Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Suppression APIs

Kasplo Suppression APIs allow you to programmatically manage recipients and domains that should be excluded from future email sending.

Suppressions protect sender reputation, enforce recipient preferences, and prevent compliance violations. When a message is submitted for a suppressed target, Kasplo marks the message as Rejected during internal processing and prevents external delivery.


Authentication & Headers

Authenticate all suppression requests using your Kasplo API key passed as a Bearer token in the Authorization header. For requests containing a JSON body, include Content-Type: application/json.

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Scope Note: Kasplo automatically derives account ownership and authorization scope from your API key. Do not submit parameters like account_id, scope, source, or unsubscribe_method.


Suppression Types

Type
Target
Description
Blocking Behavior

UNSUB

Email

Recipient unsubscribed via opt-out link, one-click, or API.

Blocks marketing emails; allows transactional emails.

MANUALLY-DEACTIVATED

Email

Manually blocked email address.

Blocks all emails to that address.

HARD-BOUNCE

Email

System-generated permanent delivery failure.

Read-only. Created automatically by the delivery engine.

SPAM

Email

System-generated spam complaint.

Read-only. Created automatically by the delivery engine.

DOMAIN

Domain

Suppressed recipient domain (e.g. example.com).

Blocks all emails to that exact domain.

Exact Matching: Domain matching is strictly exact. Suppressing example.com does not automatically suppress subdomains like mail.example.com. System Types: HARD-BOUNCE and SPAM appear in list and retrieval responses but cannot be manually created or deleted via API.


Endpoints Overview

Method
Endpoint
Action

POST

/v1/suppression

Add a single suppression (Email or Domain)

GET

/v1/suppression/{id}

Retrieve a suppression by UUID

GET

/v1/suppression

List suppressions with pagination and filters

DELETE

/v1/suppression/{id}

Remove a suppression by UUID

DELETE

/v1/suppression?email={email}&type={type}

Remove a suppression by email and type query

POST

/v1/suppression/batch

Add up to 100 suppressions in a single request

POST

/v1/suppression/batch/remove

Remove up to 100 suppressions in batch (by IDs, Emails, or Domains)


1. Add a Suppression

Create a new suppression record for an email address or an entire domain.

Request Fields

Field
Type
Required
Description

email

string

Conditional

Recipient email address. Required for UNSUB or MANUALLY-DEACTIVATED.

domain

string

Conditional

Bare domain (e.g. blocked.example.com). Required for DOMAIN.

type

string

Yes

Suppression type: UNSUB, MANUALLY-DEACTIVATED, or DOMAIN.

reason

string

No

Optional explanation (up to 500 characters).

Provide exactly one of email or domain.

Examples

A. Add Unsubscribe Suppression (UNSUB)

B. Add Manually Suppressed Email (MANUALLY-DEACTIVATED)

C. Add Domain Suppression (DOMAIN)

Response (201 Created / 200 OK)

Returns 201 Created for a new record, or 200 OK if the record already exists.


2. Retrieve a Suppression by ID

Example

Response (200 OK)

  • Returns 404 Not Found if the suppression record does not exist in your account.


3. List & Search Suppressions

Retrieve a paginated list of suppressions with optional filtering by type, email, or domain.

Query Parameters

Parameter
Type
Default
Description

limit

integer

50

Maximum items to return (1 to 1000).

offset

integer

0

Number of records to skip for pagination.

type

string

—

Filter by type: UNSUB, MANUALLY-DEACTIVATED, HARD-BOUNCE, SPAM, DOMAIN.

email

string

—

Exact email address match. Cannot be combined with domain.

domain

string

—

Exact domain match. Cannot be combined with email.

Examples

A. List All Active Suppressions

B. Filter by Suppression Type

C. Search by Email

D. Search by Domain

Response (200 OK)


4. Remove a Suppression

Kasplo provides two methods to remove single suppression records: by ID or by query parameters.

Option A: Remove by ID

Option B: Remove by Email & Type Query

Use this method to remove a suppression without needing to look up its UUID first.

Response (200 OK)

  • deleted is 0 if no matching active suppression was found in your account.

  • System-generated suppressions (HARD-BOUNCE, SPAM) cannot be deleted.


5. Add Batch Suppressions

Add between 1 and 100 suppression records in a single transactional request.

Request Example

Response (200 OK)

  • index refers to the zero-based index of the entry in your request array.


6. Remove Batch Suppressions

Remove between 1 and 100 suppression records in a single call. You can select targets by UUIDs, by email addresses and type, or by domains.

Provide exactly one selector: ids, emails, or domains.

Examples

A. Remove by Suppression IDs

B. Remove by Emails & Type

type is required when removing by emails.

C. Remove by Domains

type (DOMAIN) is required when removing by domains.

Response (200 OK)


Errors & HTTP Status Codes

HTTP Status
Description
Troubleshooting

400

Bad Request

Validation error: malformed email, invalid domain format, or reason > 500 characters.

401

Unauthorized

Missing or invalid API key.

403

Forbidden

Insufficient permissions for the requested account scope, or attempting to delete a read-only system suppression (HARD-BOUNCE, SPAM).

404

Not Found

Requested suppression UUID was not found on GET /v1/suppression/{id} (note: DELETE requests for non-existent records return 200 OK with deleted: 0).

429

Rate Limited

Request quota exceeded. Follow the Retry-After header.

500

Internal Error

Unexpected server error. Retry using exponential backoff.

Validation Error Example (400 Bad Request)

For customer-managed unsubscribe workflows and header handling, see Unsubscribe Management.

Last updated