Skip to content
Inkbox

Inkbox

ContactDocs
GuidesAPI Reference

Ctrl K

GuidesAPI Reference

Jump to

Manage Identities

Agent identities are org-scoped and identified by a unique agent_handle. Handles are normalized — a leading @ is automatically stripped, so @my-agent and my-agent are equivalent.


Create identity POST

POST /identities

Create a new agent identity. The handle must be unique within your organization. You can optionally create and link a mailbox, provision and link a phone number, and attach access to existing vault secrets in the same request.

Request body

FieldTypeRequiredDescription
agent_handlestringYesUnique handle for the identity. Leading @ is stripped automatically.
mailboxobjectNoOptional nested mailbox-creation payload. If omitted, the identity is created without a mailbox.
phone_numberobjectNoOptional nested phone-number provisioning payload. If omitted, the identity is created without a phone number.
vault_secret_idsstring or arrayNoOptional vault secret attachment request. Provide a single secret ID string, a list of secret IDs, or "all" / "*" to attach all active secrets in the organization's active vault.

mailbox fields

FieldTypeRequiredDescription
display_namestringNoHuman-readable mailbox name. Max 255 chars. Defaults to agent_handle if omitted.
email_local_partstringNoRequested mailbox local part before @inkboxmail.com. If omitted, the server generates a random unique local part.

phone_number fields

FieldTypeRequiredDescription
typestringNoNumber type to provision: toll_free or local. Defaults to toll_free.
statestringNoOptional US state abbreviation filter. Only supported when type is local.
incoming_call_actionstringNoHow inbound calls are handled: auto_reject, auto_accept, or webhook. Defaults to auto_reject.
client_websocket_urlstringConditionallyRequired when incoming_call_action is auto_accept. Must be a wss:// URL.
incoming_call_webhook_urlstringConditionallyRequired when incoming_call_action is webhook. Must be an https:// URL.
incoming_text_webhook_urlstringNoOptional https:// webhook URL for inbound SMS/MMS notifications.

vault_secret_ids

Use this to attach existing vault secret access to the new identity. The organization must already have an active vault. If omitted, no vault secret access is attached.

Accepted forms:

  • A single stringified UUID to attach one secret
  • A list of UUIDs to attach specific secrets
  • "all" or "*" to attach all active secrets in the active vault

Request example

JSONJSON

Response (201)

JSONJSON

If mailbox is omitted, the identity is still created successfully and email_address is null. If phone_number is omitted, the identity is created without a linked phone number. If vault_secret_ids is omitted, the identity is created without any vault secret access.

Mailbox local-part validation

When you provide mailbox.email_local_part, it must satisfy these rules:

  • Length: 3–64 characters
  • Characters: lowercase letters, numbers, hyphens (-), underscores (_), and dots (.)
  • Start/end: must begin and end with a letter or number
  • No consecutive dots: my..agent is rejected
  • No @: provide the handle only, not a full email address
  • Reserved names blocked: common system addresses (e.g. admin, postmaster, noreply, support, billing) and similar restricted names are rejected. Separator variants are normalized before validation.

Error responses

StatusDescription
403Organization ID missing from token
404No active vault exists for the organization, requested vault secrets were not found, or no phone numbers matched the requested criteria
409Handle already taken or requested mailbox address already taken
429Phone number limit reached for the organization
422Request validation failed
502Phone number provisioning failed
503Mailbox address generation or final insert collided; retry the request

Code examples


List identities GET

GET /identities

List all non-deleted identities for your organization, newest first.

Response (200)

JSONJSON

Code examples


Get identity GET

GET /identities/{agent_handle}

Get a single identity with its linked communication channels. The detail response includes nested mailbox and phone number objects. Channel assignment endpoints also return this same detail model.

Path parameters

ParameterTypeDescription
agent_handlestringHandle of the identity (leading @ is stripped)

Response (200)

JSONJSON

If no mailbox or phone number is assigned, those fields are null.

Error responses

StatusDescription
403Organization ID missing from token
404Identity not found or deleted

Code examples


Update identity PATCH

PATCH /identities/{agent_handle}

Update an identity's handle or status. Only supplied fields are modified.

Path parameters

ParameterTypeDescription
agent_handlestringCurrent handle of the identity to update

Request body

FieldTypeRequiredDescription
agent_handlestringNoNew handle. 1–255 chars. Leading @ is stripped.
statusstringNoNew status: active or paused

Request example

JSONJSON

Response (200)

JSONJSON

Error responses

StatusDescription
400Invalid status value
403Organization ID missing from token
404Identity not found or deleted
409New handle already taken within the organization

Code examples


Delete identity DELETE

DELETE /identities/{agent_handle}

Delete an identity. Any assigned mailbox or phone number is unlinked (but not deleted — they remain available for reassignment). Returns 204 No Content on success.

Path parameters

ParameterTypeDescription
agent_handlestringHandle of the identity to delete

Code examples


Identity object

FieldTypeDescription
idUUIDUnique identity identifier
organization_idstringOrganization that owns this identity
agent_handlestringUnique handle within the organization
email_addressstring | nullEmail address of the linked mailbox (e.g. sales.team@inkboxmail.com), or null if no mailbox is linked
statusstringLifecycle status: active, paused, deleted
created_atstringCreation timestamp (ISO 8601)
updated_atstringLast update timestamp (ISO 8601)

Identity detail object

Extends the identity object with linked channel data. Returned by the get and channel assignment endpoints.

FieldTypeDescription
...all identity fields
mailboxobject | nullLinked mailbox object, or null if unassigned
phone_numberobject | nullLinked phone number object, or null if unassigned

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

Manage Identities