Skip to main content
Per-identity allow/block rules for inbound iMessage traffic. Rules attach to the agent identity and are addressed by 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 an allow rule can reach the agent
  • imessage_filter_mode: "blacklist" — every number can reach the agent except those matching a block rule
Set 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

List contact rules for an agent identity, newest first. An identity-scoped API key may only address its own identity’s 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

Add an allow or block rule for an agent identity. New rules are always created active.

Path parameters

Request body

Request example

JSON

Response (201)

Returns the new rule. See Contact rule object.

Error responses

Code examples


Get contact rule

Fetch a single rule by ID.

Path parameters

Response (200)

Returns the rule. See Contact rule object.

Error responses


Update contact rule

Change a rule’s 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

Delete a rule. Requires an admin API key, or manage rules from the Inkbox Console.

Path parameters

Response (204)

No content.

Error responses


List org iMessage contact rules

Org-wide aggregate list of iMessage contact rules across every identity. Requires an admin API key, or browse rules in the Inkbox Console.

Query parameters

Response (200)

Returns a list[ContactRule] ordered newest first.

Code examples


Contact rule object

Additional resources