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);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.allow_address(
"jordan@example.com",
"Customer reconfirmed opt-in.",
)
print(result)curl -X POST 'https://api.mails.ai/v1/suppression/allow' \
-H "Authorization: Bearer $MAILS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"address": "jordan@example.com",
"attestation": "Customer reconfirmed opt-in."
}'mails suppressions allow jordan@example.com \
--attestation "Reconfirmed opt-in in account settings on 2026-06-20."{
"name": "mails_allowlist_address",
"arguments": {
"address": "jordan@example.com",
"attestation": "Customer reconfirmed opt-in."
}
}{
"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"
}201 The created allowlist entry.
400 Invalid request — malformed JSON or a field failed
validation. Also feature_not_enabled when this
server has a feature switched off (custom domains
before they are available).
401 Missing or invalid API key.
403 The API key lacks the required scope
(insufficient_scope), or the token belongs to an
app connected by sign-in and this operation is
closed to connected apps
(connected_app_not_allowed).
500 Internal server error.Add an allowlist entry
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);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.allow_address(
"jordan@example.com",
"Customer reconfirmed opt-in.",
)
print(result)curl -X POST 'https://api.mails.ai/v1/suppression/allow' \
-H "Authorization: Bearer $MAILS_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"address": "jordan@example.com",
"attestation": "Customer reconfirmed opt-in."
}'mails suppressions allow jordan@example.com \
--attestation "Reconfirmed opt-in in account settings on 2026-06-20."{
"name": "mails_allowlist_address",
"arguments": {
"address": "jordan@example.com",
"attestation": "Customer reconfirmed opt-in."
}
}{
"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"
}201 The created allowlist entry.
400 Invalid request — malformed JSON or a field failed
validation. Also feature_not_enabled when this
server has a feature switched off (custom domains
before they are available).
401 Missing or invalid API key.
403 The API key lacks the required scope
(insufficient_scope), or the token belongs to an
app connected by sign-in and this operation is
closed to connected apps
(connected_app_not_allowed).
500 Internal server error.Body Parameters
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.
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
Allowlist entry id (sup_…); revoke it with DELETE /v1/suppression/allow/{id}.
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 @.
Your statement that the recipient agreed to receive your mail, as given when the entry was added.
When the entry was revoked. Absent while it is active; a revoked entry stays in the list but lifts nothing.
When the entry was added (UTC).
Was this page helpful?