Suppressions
Manage suppressed email addresses
Control which email addresses should not receive emails from your account.
List and search suppressed email addresses. Returns up to 1000 suppressions per request. Use last_id for cursor-based pagination through large lists.
Suppressed addresses will not receive any emails from your account.
Rate limit: 10 requests per minute per account.
API token in Api-Token header
Filter suppressions by exact email address (case-insensitive).
suppressed@example.comFilter suppressions created at or after this timestamp (ISO 8601 format).
2025-01-01T00:00:00ZFilter suppressions created at or before this timestamp (ISO 8601 format).
2025-12-31T23:59:59ZThe suppression UUID from the last record of the previous response. Returns records after this suppression, enabling cursor-based pagination through large lists.
64d71bf3-1276-417b-86e1-8e66f138acfeList of suppressions
The suppression UUID
64d71bf3-1276-417b-86e1-8e66f138acfeReason for the suppression
hard bouncePossible values: 2025-01-15T10:30:00Zsuppressed@example.comtransactionalPossible values: example.comBad request - invalid parameters.
Returns unauthorized error message. Check your credentials.
Returns forbidden error message. Check your permissions.
Rate limit exceeded for the current account.
# Get all suppressions
curl -X GET https://mailtrap.io/api/suppressions \
-H 'Authorization: Bearer YOUR_API_KEY'
# Search for specific email
curl -X GET 'https://mailtrap.io/api/suppressions?email=suppressed@example.com' \
-H 'Authorization: Bearer YOUR_API_KEY'
[
{
"id": "64d71bf3-1276-417b-86e1-8e66f138acfe",
"type": "hard bounce",
"created_at": "2025-01-15T10:30:00Z",
"email": "suppressed@example.com",
"sending_stream": "transactional",
"domain_name": "example.com",
"message_bounce_category": null,
"message_category": null,
"message_client_ip": null,
"message_created_at": null,
"message_esp_response": null,
"message_esp_server_type": null,
"message_outgoing_ip": null,
"message_recipient_mx_name": null,
"message_sender_email": null,
"message_subject": null
}
]Add an email address to the suppression list. Suppressed addresses will not receive any emails from your account.
This endpoint requires admin-level access.
Rate limit: 10 requests per minute per account.
API token in Api-Token header
Email address to suppress
user@example.comID of the domain to suppress this email for
12345The sending stream to suppress this email for
transactionalPossible values: Reason for the suppression. Defaults to "manual import" if omitted.
manual importExample: manual importPossible values: Suppression created
Returns unauthorized error message. Check your credentials.
Returns forbidden error message. Check your permissions.
Validation errors
Rate limit exceeded for the current account.
curl -X POST https://mailtrap.io/api/suppressions \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"email": "user@example.com",
"domain_id": 12345,
"sending_stream": "transactional",
"type": "manual import"
}'
{
"data": {
"id": "64d71bf3-1276-417b-86e1-8e66f138acfe",
"type": "hard bounce",
"created_at": "2025-01-15T10:30:00Z",
"email": "suppressed@example.com",
"sending_stream": "transactional",
"domain_name": "example.com",
"message_bounce_category": null,
"message_category": null,
"message_client_ip": null,
"message_created_at": null,
"message_esp_response": null,
"message_esp_server_type": null,
"message_outgoing_ip": null,
"message_recipient_mx_name": null,
"message_sender_email": null,
"message_subject": null
}
}Remove an email from the suppression list to allow sending again.
This endpoint requires admin-level access.
API token in Api-Token header
The suppression UUID
64d71bf3-1276-417b-86e1-8e66f138acfeSuppression deleted
The suppression UUID
64d71bf3-1276-417b-86e1-8e66f138acfeReason for the suppression
hard bouncePossible values: 2025-01-15T10:30:00Zsuppressed@example.comtransactionalPossible values: example.comReturns unauthorized error message. Check your credentials.
Returns forbidden error message. Check your permissions.
Resource not found
curl -X DELETE https://mailtrap.io/api/suppressions/{suppression_id} \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"id": "64d71bf3-1276-417b-86e1-8e66f138acfe",
"type": "hard bounce",
"created_at": "2025-01-15T10:30:00Z",
"email": "suppressed@example.com",
"sending_stream": "transactional",
"domain_name": "example.com",
"message_bounce_category": null,
"message_category": null,
"message_client_ip": null,
"message_created_at": null,
"message_esp_response": null,
"message_esp_server_type": null,
"message_outgoing_ip": null,
"message_recipient_mx_name": null,
"message_sender_email": null,
"message_subject": null
}Last updated
Was this helpful?

