Email inboxes
The inbox object
The domain it is hosted on.
The agent mail to this address wakes, as this persona, billed to your credits. Each message that passes the guards starts one session. The agent must hold the persona. Fixed when the inbox is created.
Whether mail to this address wakes
owning_agent_id. true for a new inbox. An inbox made before inbound mail woke agents is false until you turn it on with Update an inbox; its mail is still stored.Create an inbox
POST /v1/identities/{id}/emails — scope agents:write
Give either an explicit address or a domain_id — with domain_id the localpart is derived from the agent’s name (lowercased, hyphenated, capped at 32 characters, then suffixed -2, -3, … against what is taken). Give neither and the inbox gets an address on your organization’s system domain, which is created for you if you have none.
The agent inbound mail is for (
agt_…). Required for studio companies. A developer platform workspace may leave it out for an agentless inbox: mail is stored on the identity’s message feed and fires the email.received webhook, but wakes no agent. Agentless inboxes are listed only to clients that send Vetta-Version: 2026-12-01 or later, so older integrations see the same lists as before.A full address to claim. The localpart must match
[a-z0-9._-]{2,64}. Mutually exclusive with domain_id.POST /v1/domains { "kind": "system" } (CLI: naive identity domain connect, no --domain). Its DNS is published for you, so it is ready for inboxes without a registrar; pass its id as domain_id, or an address on it. See Domains.
validation_failed (400) for a malformed localpart, or for supplying both address and domain_id; not_found (404) for an unknown identity, domain, or agent; name_conflict (409, param: "address") when the address is already an inbox in this organization; job_not_ready (409, retryable) while the domain is not yet active. A domain error names the field you sent — address or domain_id.
List inboxes
GET /v1/identities/{id}/emails — scope agents:read. Returns a paginated list of inbox objects; accepts limit.
Update an inbox
PATCH /v1/identities/{id}/emails/{eid} — scope agents:write. Turns the wake on or off: whether mail to the address starts a session for its agent. Audited as email.updated. Answers the inbox.
true to wake the agent on each message that passes the guards; false to store mail only.Delete an inbox
DELETE /v1/identities/{id}/emails/{eid} — scope agents:write. Mail to the address stops being accepted.
Send email
POST /v1/identities/{id}/emails/{eid}/send — scope sessions:write
Gated on the domain’s dns_status. A send attempted before SPF/DKIM are provisioned is refused with a retryable job_not_ready — verify the domain and try again.
Answers 202 with a receipt, not a message object — the provider’s own message id is deliberately not surfaced. Once the provider accepts it, the message is kept as an outbound message.
job_not_ready (409, retryable) while the domain is unverified; validation_failed (400); insufficient_credits (402).
Phone numbers
The phone number object
sms_inbound is live the moment the number is bought. sms_outbound is true iff campaign_status is approved. voice is always false — voice is not supported, and the field exists so its absence is explicit.The agent inbound texts wake, as this persona, billed to your credits.
null when none is set (bought without one, or its agent was deleted). The agent must hold the persona. Set or clear it with Update a number; texts that arrived with no agent set are never woken.Provision a number
POST /v1/identities/{id}/phones — scope billing:write
A number is a purchase, which is why this needs billing:write and not agents:write. It costs $1.15 per 30 days: the first 30 days are held before the number is bought and booked once it is, and each later period is charged from your credits (on the developer platform, a number whose period cannot be paid is released). There is no fixed limit on how many numbers an organization holds. Buying needs a live company: a test-mode key (sk_test_) is refused. Numbers run under the deployment’s one shared carrier registration; registering your own brand is not available yet.
The legal name of the deployment’s shared carrier registration; any other name is refused before anything is bought.
sole_prop only. Checked for shape, then discarded: no passcode is sent, and it is never stored.The agent inbound texts wake (
agt_…). It must hold this persona. Checked before the purchase; if the agent is deleted mid-purchase, the number comes back with owning_agent_id: null.202, not 201: the number exists and can receive immediately, but outbound waits on a carrier decision.
Errors — validation_failed (400) when a tier-specific field is missing or supplied for the wrong tier, or owning_agent_id is not an agent id or names an agent that does not hold this persona, or legal_name is not the shared registration’s; validation_failed (400) from a test-mode company or key (numbers need a live company); forbidden (403) without billing:write; insufficient_credits (402) when your credits cannot cover the first 30 days — nothing is bought; not_found (404) when the identity or owning_agent_id names nothing in this organization.
List numbers
GET /v1/identities/{id}/phones — scope agents:read. Returns a paginated list; accepts limit.
Update a number
PATCH /v1/identities/{id}/phones/{pid} — scope agents:write. Returns the number. Recorded in the audit log as phone.updated.
The body is strict: any other field is 400 validation_failed.
Errors — validation_failed (400) for another field, or an owning_agent_id that is not an agent id or names an agent that does not hold this persona; not_found (404) when this identity holds no such number, or owning_agent_id names no agent in this organization.
Release a number
DELETE /v1/identities/{id}/phones/{pid} — scope billing:write. The number returns to the carrier and cannot be reclaimed.
Send SMS
POST /v1/identities/{id}/phones/{pid}/send — scope sessions:write
List inbound messages
GET /v1/identities/{id}/messages — scope agents:write. It holds strangers’ words and addresses, so a hosted app’s own read-only key can’t reach it.
Everything that arrived for this persona, both channels unless one is named.
Page size. See Pagination.
SPF/DKIM/DMARC results for mail, carrier origin for SMS — kept for the audit of why the message was accepted.
The session this message woke, or
null: a guard held it (guard_reason), the endpoint has no owning agent, or the agent couldn’t start (it doesn’t hold the persona, or the balance is too low). A wake that couldn’t start is retried for 15 minutes, so this can still fill in.The wake guard that held the message, or
null. A held message is stored and never wakes an agent.Mark a message read
POST /v1/identities/{id}/messages/{mid}/read — scope agents:write
Returns the message. Marking a read message read again keeps the time it was first read.
validation_failed (400) when read is missing or not a boolean; not_found (404) when this identity holds no such message.
List sent messages
GET /v1/identities/{id}/sent — scope agents:write
Everything the persona sent, newest first: through Send email and through its agent’s own email.send tool alike. Returns a paginated list; accepts limit.
Identities
The persona these endpoints hang off.