One-click unsubscribe

POST /api/unsubscribe/{token} The target of the List-Unsubscribe-Post header (RFC 8058), called by Gmail and friends when the recipient uses their client's own unsubscribe button. Rate-limited by IP. The answer is always neutral: an unknown token gets the same response as a valid one. Confirming that a token exists would confirm that an address is in a list.

Authorization

Role in the organizationThis endpoint
OWNERAllowed
ADMINAllowed
MEMBERAllowed
A key carries the role its creator holds in this organization — never a role on AgentsMail itself. See API keys.

Path parameters

ParameterTypeDescription
tokenstringRequired. Opaque, per recipient and per send. It is generated for you and travels inside the email

Example

bash
curl -i -X POST "https://www.agentsmail.io/api/unsubscribe/$TOKEN"

Response

  • 201 Created — the created resource.
  • 401 Unauthorized — missing or invalid key, or its owner left the organization.
  • 404 Not Found — no such resource, or it belongs to another organization. The API never confirms that an id exists to a caller who has no right to it.
  • 429 Too Many Requests — over 120 requests in a minute for this key.