Skip to main content
import { createClient } from "@mailsai/sdk";

const client = createClient(); // reads MAILS_API_KEY

const result = await client.suppression.allow(
  "jordan@example.com",
  "Customer reconfirmed opt-in.",
);
console.log(result);
{
  "id": "sup_01JZX8K3M9Q4P7VN2YB6RTDC0E",
  "address": "jordan@example.com",
  "attestation": "<attestation>",
  "revoked_at": "2026-10-04T12:00:00.000Z",
  "created_at": "2026-10-04T12:00:00.000Z"
}

Add an allowlist entry

Attests that a recipient consents, overriding non-hard-bounce suppression for that address.
POST/v1/suppression/allowscope · manage
import { createClient } from "@mailsai/sdk";

const client = createClient(); // reads MAILS_API_KEY

const result = await client.suppression.allow(
  "jordan@example.com",
  "Customer reconfirmed opt-in.",
);
console.log(result);
{
  "id": "sup_01JZX8K3M9Q4P7VN2YB6RTDC0E",
  "address": "jordan@example.com",
  "attestation": "<attestation>",
  "revoked_at": "2026-10-04T12:00:00.000Z",
  "created_at": "2026-10-04T12:00:00.000Z"
}

Body Parameters

addressstringrequired

The recipient to send to again despite a complaint or unsubscribe; a hard bounce is not lifted. Matched in lowercase, without any +tag and, for gmail.com and googlemail.com, without dots before the @, so one entry covers each such spelling.

attestationstringrequired

Your statement that the recipient agreed to receive your mail, 20 to 2,000 characters. It is stored with the entry and returned with it.

Response

idstring

Allowlist entry id (sup_…); revoke it with DELETE /v1/suppression/allow/{id}.

addressstring

The address the entry covers. The create response echoes it as sent; the list shows it as matched: lowercase, without a +tag, and for Gmail without dots before the @.

attestationstring

Your statement that the recipient agreed to receive your mail, as given when the entry was added.

revoked_atstring

When the entry was revoked. Absent while it is active; a revoked entry stays in the list but lifts nothing.

created_atstring

When the entry was added (UTC).

Was this page helpful?