Add an allow or block entry
cooper_create_list_entryUse this when an agent should only mail approved recipients, or should ignore unwanted senders. Requires auth. Inputs: direction (required; send, receive, or reply), type (required; allow or block), entry (required; email or domain), inbox_id (optional; omit for the account-wide list), reason (optional note). Returns the list entry. HTTP 201 when created, HTTP 200 when that entry already exists. A block match rejects the address. A non-empty allow list rejects everyone else. When an inbox has any entries for a direction, only that inbox's lists apply. Sends that hit a list return 403 recipient_blocked and are not sent, stored, or counted. Blocked inbound mail is not stored and fires message.blocked. Progress email to a verified owner is exempt. The per-inbox task allowlist is unchanged. Fails with 400 invalid_list, 400 invalid_entry, 400 list_full (1000 entries), or inbox_not_found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | allow or block. | |
| entry | Yes | Email address or domain to allow or block. Stored lowercase. | |
| reason | No | Optional note stored with the entry. | |
| inbox_id | No | Inbox id (inb_…), username, or full email. Omit for the account-wide list. | |
| direction | Yes | send checks recipients. receive checks new inbound mail. reply checks mail that answers an outbound Message-ID. |