Questions · Published 2026-10-20 · Updated 2026-10-20 · AgentiSend
How do I limit who can email my AI agent?
Limit who can email an AI agent with an allow list on the domain. Only a listed sender is stored, and a block rule wins.
Limit who can email an AI agent with an allow list on the domain. Only a listed sender is stored, and a block rule wins.
A block rule refuses a sender when either the envelope or the From header matches it, and an allow list stores the message when either address matches an allow rule. inbound_policy stays open until you set allowlist with PATCH /domains/{id}.
Set the list
POST /domains/{id}/inbound-rules adds one rule. The pattern is an address, a bare domain (every address at that domain, not its subdomains), or *@example.com. kind is allow or block.
curl -sS -X POST https://api.agentisend.com/domains/9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42/inbound-rules \
-H "Authorization: Bearer $AGENTISEND_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"kind":"allow","pattern":"example"}'201
{
"created_at": "2026-09-04T09:14:00.000Z",
"domain_id": "9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42",
"id": "9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42",
"kind": "allow",
"note": "example",
"object": "inbound_rule",
"pattern": "example"
}GET /domains/{id}/inbound-rules returns the rules and inbound_policy. A domain holds 1,000 rules. Past that, the refusal names the ceiling and DELETE /domains/{id}/inbound-rules/{rule_id}.
curl -sS -X GET https://api.agentisend.com/domains/9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42/inbound-rules \
-H "Authorization: Bearer $AGENTISEND_API_KEY"200
{
"data": [],
"has_more": false,
"inbound_policy": "open",
"next_cursor": "example",
"object": "list"
}POST /domains/{id}/inbound-rules/batch/add and POST /domains/{id}/inbound-rules/batch/remove change up to 500 patterns in one call. Each item succeeds or fails on its own.
PATCH /domains/{id} with "inbound_policy": "allowlist" is the switch. "open" stores every sender a block rule does not match.
curl -sS -X PATCH https://api.agentisend.com/domains/9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42 \
-H "Authorization: Bearer $AGENTISEND_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'200
{
"capabilities": {
"receiving": "enabled",
"sending": "enabled"
},
"click_tracking": false,
"created_at": "2026-09-04T09:14:00.000Z",
"dkim_selector": "example",
"id": "9c8f8f0e-3d1a-4d3f-9a1e-2b7c1a0f5e42",
"inbound_hold_mode": "monitor",
"inbound_policy": "open",
"inbound_refused_count": -9007199254740991,
"name": "example",
"object": "domain",
"open_tracking": false,
"provider_hints": {
"cloudflare": "example",
"godaddy": "example",
"namecheap": "example",
"route53": "example"
},
"recent_events": [],
"records": [],
"region": "us",
"return_path_subdomain": "example",
"status": "pending",
"tls_mode": "opportunistic",
"tracking_issues": [],
"tracking_subdomain": "example",
"verified_at": "2026-09-04T09:14:00.000Z",
"warnings": [],
"zone": "example"
}What happens to a refused message
The message is not stored. Nothing is sent back to that sender. GET /emails/receiving/refusals counts the refusals per domain. The same count is on the Received tab as "Refused by rule".
Receiving at your own domain follows the status page: these calls apply to mail the domain accepts. Can an AI agent receive email? says whether that is open.