# Suppressions

Control which email addresses should not receive emails from your account.

## List suppressions

> 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.<br>

```json
{"openapi":"3.1.0","info":{"title":"Email Sending","version":"2.0.0"},"tags":[{"name":"suppressions","description":"Control which email addresses should not receive emails from your account.\n"}],"servers":[{"description":"Mailtrap account API (`mailtrap.io`) for domains, suppressions, stats, and email logs.\nError JSON matches other account endpoints (`error` or string `errors`), not the `send.api` / `bulk.api` sending shape (`success` + `errors` array).\n","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"responses":{"GetSuppressionsResponse":{"description":"List of suppressions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Suppression"}}}}},"BAD_REQUEST":{"description":"Bad request - invalid parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"Unauthorized":{"description":"Returns unauthorized error message. Check your credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"Forbidden":{"description":"Returns forbidden error message. Check your permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsDeniedResponse"}}}},"LIMIT_EXCEEDED":{"description":"Rate limit exceeded for the current account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceededResponse"}}}}},"schemas":{"Suppression":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The suppression UUID"},"type":{"type":"string","enum":["hard bounce","unsubscription","spam complaint","manual import"],"description":"Reason for the suppression"},"created_at":{"type":"string","format":"date-time"},"email":{"type":"string","format":"email"},"sending_stream":{"type":"string","enum":["transactional","bulk","any"]},"domain_name":{"type":["string","null"]},"message_bounce_category":{"type":["string","null"]},"message_category":{"type":["string","null"]},"message_client_ip":{"type":["string","null"]},"message_created_at":{"type":["string","null"],"format":"date-time"},"message_esp_response":{"type":["string","null"]},"message_esp_server_type":{"type":["string","null"]},"message_outgoing_ip":{"type":["string","null"]},"message_recipient_mx_name":{"type":["string","null"]},"message_sender_email":{"type":["string","null"]},"message_subject":{"type":["string","null"]}}},"BadRequest":{"title":"BadRequestResponse","description":"Invalid parameters. Some endpoints return an empty body with HTTP 400; when present, a message may use an `error` field.\n","type":"object","properties":{"error":{"type":"string"}}},"UnauthenticatedResponse":{"title":"UnauthenticatedResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"PermissionsDeniedResponse":{"title":"PermissionsDeniedResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}},"RateLimitExceededResponse":{"title":"RateLimitExceededResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}}}},"paths":{"/api/suppressions":{"get":{"summary":"List suppressions","description":"List and search suppressed email addresses. Returns up to 1000 suppressions per request. Use `last_id` for cursor-based pagination through large lists.\n\nSuppressed addresses will not receive any emails from your account.\n\nRate limit: 10 requests per minute per account.\n","operationId":"getSuppressions","tags":["suppressions"],"parameters":[{"name":"email","in":"query","description":"Filter suppressions by exact email address (case-insensitive).","schema":{"type":"string","format":"email"}},{"name":"start_time","in":"query","description":"Filter suppressions created at or after this timestamp (ISO 8601 format).","schema":{"type":"string","format":"date-time"}},{"name":"end_time","in":"query","description":"Filter suppressions created at or before this timestamp (ISO 8601 format).","schema":{"type":"string","format":"date-time"}},{"name":"last_id","in":"query","description":"The suppression UUID from the last record of the previous response. Returns records after this suppression, enabling cursor-based pagination through large lists.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"$ref":"#/components/responses/GetSuppressionsResponse"},"400":{"$ref":"#/components/responses/BAD_REQUEST"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/LIMIT_EXCEEDED"}}}}}}
```

## Create suppression

> Add an email address to the suppression list. Suppressed addresses will not receive any emails from your account.\
> \
> {% hint style="warning" %}\
> This endpoint requires admin-level access.\
> {% endhint %}\
> \
> Rate limit: 10 requests per minute per account.<br>

```json
{"openapi":"3.1.0","info":{"title":"Email Sending","version":"2.0.0"},"tags":[{"name":"suppressions","description":"Control which email addresses should not receive emails from your account.\n"}],"servers":[{"description":"Mailtrap account API (`mailtrap.io`) for domains, suppressions, stats, and email logs.\nError JSON matches other account endpoints (`error` or string `errors`), not the `send.api` / `bulk.api` sending shape (`success` + `errors` array).\n","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"responses":{"CreateSuppressionResponse":{"description":"Suppression created","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Suppression"}}}}}},"Unauthorized":{"description":"Returns unauthorized error message. Check your credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"Forbidden":{"description":"Returns forbidden error message. Check your permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsDeniedResponse"}}}},"UnprocessableEntity":{"description":"Validation errors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntity"}}}},"LIMIT_EXCEEDED":{"description":"Rate limit exceeded for the current account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitExceededResponse"}}}}},"schemas":{"Suppression":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The suppression UUID"},"type":{"type":"string","enum":["hard bounce","unsubscription","spam complaint","manual import"],"description":"Reason for the suppression"},"created_at":{"type":"string","format":"date-time"},"email":{"type":"string","format":"email"},"sending_stream":{"type":"string","enum":["transactional","bulk","any"]},"domain_name":{"type":["string","null"]},"message_bounce_category":{"type":["string","null"]},"message_category":{"type":["string","null"]},"message_client_ip":{"type":["string","null"]},"message_created_at":{"type":["string","null"],"format":"date-time"},"message_esp_response":{"type":["string","null"]},"message_esp_server_type":{"type":["string","null"]},"message_outgoing_ip":{"type":["string","null"]},"message_recipient_mx_name":{"type":["string","null"]},"message_sender_email":{"type":["string","null"]},"message_subject":{"type":["string","null"]}}},"UnauthenticatedResponse":{"title":"UnauthenticatedResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"PermissionsDeniedResponse":{"title":"PermissionsDeniedResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}},"UnprocessableEntity":{"type":"object","description":"Validation errors per field. Keys are attribute names; values are arrays of human-readable messages.\nSome endpoints may also return a `base` key with general validation errors.","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"RateLimitExceededResponse":{"title":"RateLimitExceededResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}}}},"paths":{"/api/suppressions":{"post":{"summary":"Create suppression","description":"Add an email address to the suppression list. Suppressed addresses will not receive any emails from your account.\n\n{% hint style=\"warning\" %}\nThis endpoint requires admin-level access.\n{% endhint %}\n\nRate limit: 10 requests per minute per account.\n","operationId":"createSuppression","tags":["suppressions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","domain_id","sending_stream"],"properties":{"email":{"type":"string","format":"email","description":"Email address to suppress"},"domain_id":{"type":"integer","description":"ID of the domain to suppress this email for"},"sending_stream":{"type":"string","enum":["transactional","bulk"],"description":"The sending stream to suppress this email for"},"type":{"type":"string","enum":["hard bounce","unsubscription","spam complaint","manual import"],"default":"manual import","description":"Reason for the suppression. Defaults to \"manual import\" if omitted."}}}}}},"responses":{"201":{"$ref":"#/components/responses/CreateSuppressionResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/LIMIT_EXCEEDED"}}}}}}
```

## Delete suppression

> Remove an email from the suppression list to allow sending again.\
> \
> {% hint style="warning" %}\
> This endpoint requires admin-level access.\
> {% endhint %}<br>

```json
{"openapi":"3.1.0","info":{"title":"Email Sending","version":"2.0.0"},"tags":[{"name":"suppressions","description":"Control which email addresses should not receive emails from your account.\n"}],"servers":[{"description":"Mailtrap account API (`mailtrap.io`) for domains, suppressions, stats, and email logs.\nError JSON matches other account endpoints (`error` or string `errors`), not the `send.api` / `bulk.api` sending shape (`success` + `errors` array).\n","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"parameters":{"suppression_id":{"name":"suppression_id","in":"path","required":true,"description":"The suppression UUID","schema":{"type":"string","format":"uuid"}}},"responses":{"DeleteSuppressionResponse":{"description":"Suppression deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Suppression"}}}},"Unauthorized":{"description":"Returns unauthorized error message. Check your credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedResponse"}}}},"Forbidden":{"description":"Returns forbidden error message. Check your permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsDeniedResponse"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundResponse"}}}}},"schemas":{"Suppression":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The suppression UUID"},"type":{"type":"string","enum":["hard bounce","unsubscription","spam complaint","manual import"],"description":"Reason for the suppression"},"created_at":{"type":"string","format":"date-time"},"email":{"type":"string","format":"email"},"sending_stream":{"type":"string","enum":["transactional","bulk","any"]},"domain_name":{"type":["string","null"]},"message_bounce_category":{"type":["string","null"]},"message_category":{"type":["string","null"]},"message_client_ip":{"type":["string","null"]},"message_created_at":{"type":["string","null"],"format":"date-time"},"message_esp_response":{"type":["string","null"]},"message_esp_server_type":{"type":["string","null"]},"message_outgoing_ip":{"type":["string","null"]},"message_recipient_mx_name":{"type":["string","null"]},"message_sender_email":{"type":["string","null"]},"message_subject":{"type":["string","null"]}}},"UnauthenticatedResponse":{"title":"UnauthenticatedResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}},"PermissionsDeniedResponse":{"title":"PermissionsDeniedResponse","type":"object","properties":{"errors":{"type":"string","description":"Error message"}}},"NotFoundResponse":{"title":"NotFoundResponse","type":"object","properties":{"error":{"type":"string","description":"Error message"}}}}},"paths":{"/api/suppressions/{suppression_id}":{"delete":{"summary":"Delete suppression","description":"Remove an email from the suppression list to allow sending again.\n\n{% hint style=\"warning\" %}\nThis endpoint requires admin-level access.\n{% endhint %}\n","operationId":"deleteSuppression","tags":["suppressions"],"parameters":[{"$ref":"#/components/parameters/suppression_id"}],"responses":{"200":{"$ref":"#/components/responses/DeleteSuppressionResponse"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mailtrap.io/developers/email-sending/suppressions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
