Create a email suppression

POST/api/v1/email-suppressions
Requires anorganization API keywith the scopesuppressions:write

Request body

  • reasonstringrequiredunsubscribed | complained | bounced | manual

    Why they are blocked.

  • emailstringrequired

    The address to block. With scope: domain, a domain like example.com (no @).

  • scopestringaddress | domain

    address (the default) blocks one address. domain blocks every address at a domain.

  • notestring

    Optional. Your own note on why.

Request

POST/api/v1/email-suppressions
curl -X POST 'https://app.mailyte.com/api/v1/email-suppressions' \
  -H 'Authorization: Bearer mk_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "unsubscribed",
    "email": "ada@example.com"
  }'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Success.

  • dataobject
    • objectstringsuppression
    • idstring
    • emailstring

      The address, or the bare domain when scope is domain. Always lowercase.

    • scopestringaddress | domain

      A domain rule blocks every recipient at that EXACT domain. Subdomains are separate rules, matching SendGrid and Mailgun, so a rule never blocks more than the string somebody typed.

    • applies_tostringall | marketing

      What this blocks. all stops every email, including app email such as receipts and password resets. marketing stops only marketing. An unsubscribe blocks marketing; a bounce or complaint blocks everything.

    • reasonstring

      Why the address is blocked: usually unsubscribed, complained, bounced or manual. Imported rows can carry other values (import by default), so do not treat this as a closed list.

    • sourcestringmanual | automatic

      manual is a person or your API call; automatic is our bounce and complaint listener. A manual entry is never downgraded to automatic by a later event.

    • notestring

      Your own note. Null when none was written; entries we add automatically have none.

    • suppressed_atstring

      When the address was blocked.

    • expires_atstring

      When the block ends and the address can be emailed again. Null means never, which is the case for everything you add and for every bounce, complaint and unsubscribe. The one block that ends: a mailbox that stayed full for three days is skipped for 30.

Returned inside the standard envelope.

Errors

StatusWhen
401The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist.
403The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys.
404No such resource in this organization.
422The request was understood but the values were not acceptable.
429Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait.

Every status, with what causes it and what to do, is on the error reference.