agenttools
Inboxes

Create an inbox

No auth required

Creates an inbox — a durable work queue with its own ingest URL. With an API key the inbox is owned by the key's organization; without one it is created public and the response includes a one-time `claim_token`.

POST/api/inboxes

Request body

namestringrequired
descriptionstring | null
default_ttl_secondsinteger
max_eventsinteger | null

Responses

201The created inbox.
idstring
Unique identifier for the inbox, prefixed with `inbox_`.Example: "inbox_xxxxxxxxxxxxxxxxxxxxxxxx"
object"inbox"
organization_idstring | null
Owning organization ID, or null if the resource is public (created without an API key).
namestring
descriptionstring | null
ingest_urlstring
Public ingest URL (…/api/inboxes/{id}/events). Anyone with the ID can POST events here — no authentication required.
default_ttl_secondsinteger
Default event TTL in seconds, used when an ingested event doesn't specify its own. Defaults to 86400 (1 day); range 60–2592000 (30 days).
max_eventsinteger
Maximum number of pending (non-expired) events retained. Defaults to 1000.
event_countinteger
Number of pending (non-expired) events. Present on single-resource reads.
created_atinteger | null
When the inbox was created. Unix timestamp in seconds.
updated_atinteger | null
When the inbox was last updated. Unix timestamp in seconds.
claim_tokenstring
One-time token to claim ownership of this resource via POST /api/claim/{id}. Only present when created without an API key.
claim_urlstring
Relative URL for claiming the resource.
400The request was malformed or failed validation.
errorobject
type"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"
codestring
Machine-readable error code.
messagestring
Human-readable error message.
paramstring | null
The offending parameter, when applicable.
401No valid API key was provided.
errorobject
type"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"
codestring
Machine-readable error code.
messagestring
Human-readable error message.
paramstring | null
The offending parameter, when applicable.

Example request

curl
curl -X POST https://agtls.dev/api/inboxes \
  -H "Content-Type: application/json" \
  -d '{ … }'