agent_handle, whether the identity uses shared service or an attached dedicated line. The identity’s imessage_filter_mode field decides how the rule list is interpreted:
imessage_filter_mode: "whitelist"— only numbers matching anallowrule can reach the agentimessage_filter_mode: "blacklist"— every number can reach the agent except those matching ablockrule
imessage_filter_mode on the identity via PATCH /identities/{agent_handle} — see Manage identities. Rules match on exact E.164 phone numbers only in v1 (match_type: "exact_number"); the field is wired in to stay forward-compatible when additional match types are added.
Creating a duplicate rule for the same number returns 409.
When a number is blocked: inbound messages are stored but never delivered to the agent. No webhooks fire, identity-scoped keys never see them, and admin API keys or the Inkbox Console can audit them with is_blocked=true. Inbound tapbacks are not recorded, outbound sends and tapbacks to the number return 403, and the router gives the blocked human the same generic response as for an unknown agent.
Auth. List, get, and create accept admin API keys and claimed agent keys; unclaimed (mid-signup) agent keys are rejected. PATCH, DELETE, and the org-wide list require an admin-scoped API key, or you can manage them as a user in the Inkbox Console.
List contact rules
agent_handle — any other handle returns 403 (this applies to list, get, and create alike).
Path parameters
Query parameters
Response (200)
JSON
Code examples
Create contact rule
Path parameters
Request body
Request example
JSON
Response (201)
Returns the new rule. See Contact rule object.Error responses
Code examples
Get contact rule
Path parameters
Response (200)
Returns the rule. See Contact rule object.Error responses
Update contact rule
action. Requires an admin API key, or manage rules from the Inkbox Console.
Path parameters
Request body
action is required.
Request example
JSON
Response (200)
Returns the updated rule.Error responses
Delete contact rule
Path parameters
Response (204)
No content.Error responses
List org iMessage contact rules
Query parameters
Response (200)
Returns alist[ContactRule] ordered newest first.
Code examples
Contact rule object
Additional resources
- iMessage guide — filtering
- Manage identities — set
imessage_filter_mode - Phone contact rules — the per-number equivalent for calls and texts

