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

Create tracking opt-out

Add an email address to the tracking opt-out list for a sending domain. Opted-out addresses are excluded from open and click tracking on that domain.

Rate limit: 10 requests per minute per account.

post
Authorizations
Api-TokenstringRequired

API token in Api-Token header

Body
emailstring · emailRequired

Email address to opt out of tracking

Example: tracked@example.com
domain_idintegerRequired

ID of the sending domain this tracking opt-out applies to

Example: 12345
Responses
201

Tracking opt-out created

application/json
post/api/tracking_opt_outs
cURL
curl -X POST https://mailtrap.io/api/tracking_opt_outs \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "tracked@example.com",
    "domain_id": 12345
  }'
{
  "data": {
    "id": "64d71bf3-1276-417b-86e1-8e66f138acfe",
    "email": "tracked@example.com",
    "created_at": "2025-01-15T10:30:00Z",
    "domain_name": "example.com"
  }
}

Last updated

Was this helpful?