agent_handle. For a shared policy, set mail_filter_mode and omit rule direction: new rules apply to both sending and receiving. Contact permission edits and standalone exact-email rules change the same choices.
whitelist: a matchingallowdomain permits communication; otherwise it is denied.blacklist: a matchingblockdomain denies communication; otherwise it is permitted.
allow or block takes precedence over domains and defaults in either mode. Evaluate only rules covering the communication’s direction. Inbound is from the external party to the agent; outbound is from the agent to that party. Use mail_inbound_filter_mode and mail_outbound_filter_mode for independent defaults. See Manage identities and the split-mode example. New directional SDK/CLI options require 0.7.3 or later.
Receiving permission does not permit a reply. Sending permission does not permit receiving, and does not replace other send requirements.
Companion mode can permit a sponsored email conversation without globally allowing every participant. An applicable explicit block anywhere in its exact participant cohort vetoes Companion permission in that direction, after exact-address-over-domain precedence. Separate recipient branches need separate sponsorship.
To be eligible to activate a group, the actual sender address needs active exact_email allows covering both inbound and outbound. One both allow and two one-way allows are equivalent. Domain allows and access from blacklist defaults do not make a sender eligible. Their qualifying authenticated message, not the rule alone, activates the scope.
Deprecation. The previous mailbox-addressed routes (/mailboxes/{email_address}/contact-rules) are deprecated. They still work and return the same fields they did before. Migrate to the identity-keyed routes documented here.
Rules match on either a full email address (match_type: "exact_email") or a bare domain (match_type: "domain").
Direction and rule identity
- Create defaults to
direction: "both". PATCH withoutdirectionpreserves current coverage. - List with
direction=inboundoroutboundincludes matching one-way rules andbothrules.direction=bothselects only bidirectional rules. Omit the filter for all rules without duplicates. Action and match-type filters apply independently, before pagination. A2A direction filters remain exact matches with their existing defaults. - One
bothrule has one action. Opposite actions require separate inbound and outbound rules. - Adding compatible coverage for the same target widens the existing rule to
both. Matching actions and lifecycle states consolidate even after editing two existing rules. Previously issued IDs remain usable for get, update, and delete of the consolidated logical rule; lists contain it once. An ID does not permanently identify its original direction. - Successful POST returns
201, including widening an existing rule. Use the returned ID and direction; success does not guarantee a new ID. PATCH returns200. - Creating coverage that already exists returns
409, with the existing duplicate error andexisting_rule_id. Conflicting actions also return409; create does not overwrite them. Paused coverage is not silently reactivated or combined with active coverage.
message.received webhook fires.
Auth. Claimed agent keys can read their permitted rules. Creating, updating, or deleting rules requires an admin API key or the Inkbox Console. Agent writes return 403. Org-wide listings require administrative access.
List contact rules
agent_handle. Another handle returns 403; agent keys cannot create rules.
Path parameters
Query parameters
Response (200)
JSON
Code examples
Create contact rule
Path parameters
Request body
Request example
JSON
Response (201)
Returns the saved rule, which may be an existing rule widened toboth. See Contact rule object.
Error responses
Code examples
Get contact rule
Path parameters
Response (200)
Returns the rule. See Contact rule object.Error responses
Code examples
Update contact rule
match_type and match_target are immutable — delete the rule and create a new one to change the target.
Path parameters
Request body
Supplyaction, direction, or both. apply_to requires action and cannot be combined with direction. Supplied values cannot be null.
Request example
JSON
Response (200)
Returns the updated rule.Change one side without removing the other
For a rule that allowsboth, this request blocks inbound and retains outbound allow in one operation:
apply_to: "both", missing action, null, or a combination with direction returns 422.
By contrast, {"direction":"inbound"} on a both rule removes outbound coverage. The outbound mode and remaining applicable rules then determine sending permission. An action-only PATCH changes every direction currently covered by that rule.
Error responses
Code examples
Delete contact rule
204 No Content on success. Requires an admin API key, or manage rules from the Inkbox Console.
Path parameters
Error responses
Code examples
List org mail contact rules
created_at descending and then id ascending. Grouping happens before pagination, and a contact’s rows can span adjacent pages.
Query parameters
Response (200)
Returns an array of contact rule objects — same shape as the per-identity list.Code examples
Contact rule object
List, get, create, update, and organization-wide list responses include a nullablecontact card for an exact target with one resolved owner in the rule’s
organization. The card follows the caller’s contact permissions
and contains no memories, memory_count, or latest_memory. Domain, unresolved,
ambiguous, and inaccessible matches return null. Hidden profile fields and
identifiers are not restored by reading a rule.
Reads resolve the current contact. An idempotent write replay preserves its
original response snapshot. SDK/CLI 0.6.11 supports these cards; CLI tables show
contact names and JSON output preserves the card.
Additional resources
- Email guide — Filtering inbound mail — narrative walk-through of whitelist/blacklist semantics
- Manage identities — set
mail_filter_mode - iMessage contact rules: the shared phone list for SMS, calls, and iMessage
- Phone contact rules — the phone-side equivalent for calls and texts

