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

List tracking opt-outs

List email addresses that have opted out of open and click tracking for your sending domains. Each record includes the domain it applies to.

Returns up to 1000 records per request. When the response includes a non-null last_id, pass it as the last_id query parameter to fetch the next page.

Rate limit: 10 requests per minute per account.

get
Authorizations
Api-TokenstringRequired

API token in Api-Token header

Query parameters
emailstring · emailOptional

Filter tracking opt-outs by exact email address (case-insensitive).

Example: tracked@example.com
start_timestring · date-timeOptional

Filter tracking opt-outs created at or after this timestamp (ISO 8601 format).

Example: 2025-01-01T00:00:00Z
end_timestring · date-timeOptional

Filter tracking opt-outs created at or before this timestamp (ISO 8601 format).

Example: 2025-12-31T23:59:59Z
last_idstring · uuidOptional

The tracking opt-out UUID from the last record of the previous response. Returns records after this opt-out, enabling cursor-based pagination through large lists.

Example: 64d71bf3-1276-417b-86e1-8e66f138acfe
Responses
200

List of tracking opt-outs

application/json
last_idstring · nullableOptional

Cursor for the next page. Present when the response is a full page (1000 records); pass this value as the last_id query parameter to continue. null when there are no more pages.

Example: 64d71bf3-1276-417b-86e1-8e66f138acfe
get/api/tracking_opt_outs
cURL
# Get all tracking opt-outs
curl -X GET https://mailtrap.io/api/tracking_opt_outs \
  -H 'Authorization: Bearer YOUR_API_KEY'

# Search for specific email
curl -X GET 'https://mailtrap.io/api/tracking_opt_outs?email=tracked@example.com' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "data": [
    {
      "id": "64d71bf3-1276-417b-86e1-8e66f138acfe",
      "email": "tracked@example.com",
      "created_at": "2025-01-15T10:30:00Z",
      "domain_name": "example.com"
    }
  ],
  "last_id": "64d71bf3-1276-417b-86e1-8e66f138acfe"
}

Last updated

Was this helpful?