{"openapi":"3.1.0","info":{"title":"Airbox","version":"0.1.0"},"paths":{"/auth/request-code":{"post":{"tags":["auth"],"summary":"Request Code","description":"Start signup/login: create the user if new and email a 6-digit code.\n\nAlways returns the same response shape so the endpoint can't be used to probe\nwhich emails are registered. `retry_after` is seconds until another send.","operationId":"request_code_auth_request_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCodeIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCodeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify":{"post":{"tags":["auth"],"summary":"Verify","operationId":"verify_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCodeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/register":{"post":{"tags":["auth"],"summary":"Register","description":"Create an account (or add a password to a code-only account).\n\nDoes not sign in — the user must verify their email with a login code first.","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterIn"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/profile":{"patch":{"tags":["auth"],"summary":"Update Profile","operationId":"update_profile_auth_profile_patch","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/set-password":{"post":{"tags":["auth"],"summary":"Set Password","operationId":"set_password_auth_set_password_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/auth/account":{"delete":{"tags":["auth"],"summary":"Delete Account","operationId":"delete_account_auth_account_delete","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountIn"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_auth_me_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/api-keys":{"get":{"tags":["auth"],"summary":"Get Api Keys","description":"List SDK API keys (metadata only — the secret is never stored in plaintext).","operationId":"get_api_keys_auth_api_keys_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyListItem"},"title":"Response Get Api Keys Auth Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/api-key":{"post":{"tags":["auth"],"summary":"Create Api Key","description":"Issue an SDK API key. Free: replaces the previous key. Pro/Team: adds another.","operationId":"create_api_key_auth_api_key_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/api-keys/{key_id}":{"delete":{"tags":["auth"],"summary":"Remove Api Key","description":"Revoke one SDK API key (Pro/Team only).","operationId":"remove_api_key_auth_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout":{"post":{"tags":["billing"],"summary":"Checkout","description":"Start a hosted Stripe Checkout for a Pro subscription; returns the URL to\nredirect the browser to.","operationId":"checkout_billing_checkout_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/topup":{"post":{"tags":["billing"],"summary":"Credit Topup","description":"One-time Stripe Checkout for a credit pack (paid plans only).","operationId":"credit_topup_billing_topup_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/portal":{"post":{"tags":["billing"],"summary":"Portal","description":"Open the Stripe Billing Portal so the user can manage/cancel.","operationId":"portal_billing_portal_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connections":{"get":{"tags":["connections"],"summary":"List Connections","operationId":"list_connections_connections_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionOut"},"title":"Response List Connections Connections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["connections"],"summary":"Create Connection","operationId":"create_connection_connections_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connections/{connection_id}":{"patch":{"tags":["connections"],"summary":"Update Connection","operationId":"update_connection_connections__connection_id__patch","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["connections"],"summary":"Delete Connection","operationId":"delete_connection_connections__connection_id__delete","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connections/{connection_id}/test":{"post":{"tags":["connections"],"summary":"Test Connection","description":"Token-free credential check: ping the provider with a read-only request\n(list models / whoami / MCP initialize) and report whether it succeeded.\nAlways 200 — the credential verdict is in the body, not the HTTP status.","operationId":"test_connection_connections__connection_id__test_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contacts":{"post":{"tags":["contacts"],"summary":"Create Contact","description":"Public sales/contact form. Rate-limited with honeypot + timing checks.","operationId":"create_contact_contacts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contexts":{"get":{"tags":["contexts"],"summary":"List Contexts","operationId":"list_contexts_contexts_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContextOut"},"title":"Response List Contexts Contexts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["contexts"],"summary":"Create Context","operationId":"create_context_contexts_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contexts/upload":{"post":{"tags":["contexts"],"summary":"Upload Context","description":"Create a Context from an uploaded Markdown file. Title comes from the first\n`# heading`, falling back to the filename; the whole file becomes the body.","operationId":"upload_context_contexts_upload_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_context_contexts_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/contexts/{context_id}":{"get":{"tags":["contexts"],"summary":"Get Context","operationId":"get_context_contexts__context_id__get","parameters":[{"name":"context_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Context Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["contexts"],"summary":"Update Context","operationId":"update_context_contexts__context_id__patch","parameters":[{"name":"context_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Context Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contexts"],"summary":"Delete Context","operationId":"delete_context_contexts__context_id__delete","parameters":[{"name":"context_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Context Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations":{"get":{"tags":["conversations"],"summary":"List Conversations","description":"The owner's reply-to-continue threads, most-recent first, with a turn count\nplus the latest sender and a reply snippet for the inbox list. Keyset-paginated\non `last_at`; pass the previous page's `next_cursor` for the next page.","operationId":"list_conversations_conversations_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}":{"get":{"tags":["conversations"],"summary":"Get Conversation","description":"One thread's ordered turns — the sender's instruction and Airbox's reply per\nmessage. Untrusted email content is deliberately not surfaced here.","operationId":"get_conversation_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom-domains":{"get":{"tags":["custom-domains"],"summary":"List Domains","operationId":"list_domains_custom_domains_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomDomainOut"},"title":"Response List Domains Custom Domains Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["custom-domains"],"summary":"Create Domain","operationId":"create_domain_custom_domains_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom-domains/{domain_id}/verify":{"post":{"tags":["custom-domains"],"summary":"Verify Domain","description":"Check DNS verification (stub until Cloudflare/SendGrid infra is live).\n\nWhen infra is ready, this will query TXT/MX records. For now, accepting\nverification marks the domain active so the UI flow can be tested end-to-end.","operationId":"verify_domain_custom_domains__domain_id__verify_post","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Domain Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/custom-domains/{domain_id}":{"delete":{"tags":["custom-domains"],"summary":"Delete Domain","operationId":"delete_domain_custom_domains__domain_id__delete","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Domain Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inboxes":{"get":{"tags":["inboxes"],"summary":"List Inboxes","operationId":"list_inboxes_inboxes_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InboxOut"},"title":"Response List Inboxes Inboxes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["inboxes"],"summary":"Create Inbox","operationId":"create_inbox_inboxes_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inboxes/{inbox_id}":{"patch":{"tags":["inboxes"],"summary":"Update Inbox","description":"Partial update, including the address's routing (LLM provider + MCP servers).\n\nOnly fields present in the request body are changed.","operationId":"update_inbox_inboxes__inbox_id__patch","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inbox Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["inboxes"],"summary":"Delete Inbox","operationId":"delete_inbox_inboxes__inbox_id__delete","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inbox Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inboxes/{inbox_id}/rotate":{"post":{"tags":["inboxes"],"summary":"Rotate Inbox","description":"Mint a new local-part for an existing inbox; the old address stops working.\nPreserves any readable prefix (only the random token is regenerated).","operationId":"rotate_inbox_inboxes__inbox_id__rotate_post","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inbox Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inboxes/{inbox_id}/vcard":{"get":{"tags":["inboxes"],"summary":"Inbox Vcard","description":"Download the address as a contact card, so users can save it (named by\nworkflow) instead of typing a hashed local-part.","operationId":"inbox_vcard_inboxes__inbox_id__vcard_get","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inbox Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inboxes/{inbox_id}/email-vcard":{"post":{"tags":["inboxes"],"summary":"Email Inbox Vcard","description":"Email the address to the owner as a contact card, so they can tap to add\nit on mobile (where typing a hashed address is painful).","operationId":"email_inbox_vcard_inboxes__inbox_id__email_vcard_post","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inbox Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inboxes/{inbox_id}/test":{"post":{"tags":["inboxes"],"summary":"Test Inbox","description":"Send a synthetic email through the real pipeline so a new user sees the\nfull round-trip (and a reply) within seconds — the activation moment.\n\nRuns inline (not via the queue) for instant feedback and so it works even\nwithout the worker/Redis running.","operationId":"test_inbox_inboxes__inbox_id__test_post","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Inbox Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/notion/connect":{"post":{"tags":["integrations"],"summary":"Notion Connect","description":"Return the Notion OAuth authorize URL for the current user (or 400 if the\nserver has no Notion OAuth credentials configured — the dashboard then falls\nback to pasting a manual integration token).","operationId":"notion_connect_integrations_notion_connect_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/notion/callback":{"get":{"tags":["integrations"],"summary":"Notion Callback","description":"Notion redirects here after consent. Verify state, exchange the code, and\npersist the access token as a `notion` connection, then bounce to the dashboard.","operationId":"notion_callback_integrations_notion_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/github/connect":{"post":{"tags":["integrations"],"summary":"Github Connect","description":"Return the GitHub OAuth authorize URL (or 400 if OAuth is not configured).","operationId":"github_connect_integrations_github_connect_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/github/callback":{"get":{"tags":["integrations"],"summary":"Github Callback","operationId":"github_callback_integrations_github_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/gitlab/connect":{"post":{"tags":["integrations"],"summary":"Gitlab Connect","description":"Return the GitLab OAuth authorize URL (or 400 if OAuth is not configured).","operationId":"gitlab_connect_integrations_gitlab_connect_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/gitlab/callback":{"get":{"tags":["integrations"],"summary":"Gitlab Callback","operationId":"gitlab_callback_integrations_gitlab_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/google/connect":{"post":{"tags":["integrations"],"summary":"Google Connect","description":"Return the Google OAuth authorize URL (or 400 if OAuth is not configured).","operationId":"google_connect_integrations_google_connect_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/google/callback":{"get":{"tags":["integrations"],"summary":"Google Callback","description":"Google redirects here after consent. Verify state, exchange the code, and\npersist a `gsheets` connection, then bounce to the dashboard.","operationId":"google_callback_integrations_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/mcp/{connection_id}/connect":{"post":{"tags":["integrations"],"summary":"Mcp Connect","description":"Discover + dynamically register against the MCP server's authorization\nserver and return the authorize URL. Stashes the discovered endpoints,\nregistered client, and PKCE verifier on the connection for the callback.","operationId":"mcp_connect_integrations_mcp__connection_id__connect_post","parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/mcp/callback":{"get":{"tags":["integrations"],"summary":"Mcp Callback","operationId":"mcp_callback_integrations_mcp_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages":{"get":{"tags":["messages"],"summary":"List Messages","description":"Keyset-paginated activity, most-recent first. Pass the previous page's\n`next_cursor` to fetch the next page; `next_cursor` is null when exhausted.","operationId":"list_messages_messages_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/{message_id}/attachments/{attachment_id}":{"get":{"tags":["messages"],"summary":"Download Attachment","description":"Stream one stored inbound attachment back to its owner.\n\nOwnership is enforced via the parent message. Returns 404 if the attachment\nis missing, not the caller's, or its bytes were nulled by the retention\npurge. The bytes are UNTRUSTED — served only as a download (never inline).","operationId":"download_attachment_messages__message_id__attachments__attachment_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes":{"get":{"tags":["recipes"],"summary":"List Recipes","operationId":"list_recipes_recipes_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecipeOut"},"title":"Response List Recipes Recipes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/recipes/{recipe_id}/apply":{"post":{"tags":["recipes"],"summary":"Apply Recipe","operationId":"apply_recipe_recipes__recipe_id__apply_post","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","title":"Recipe Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeApplyResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/referrals/me":{"get":{"tags":["referrals"],"summary":"My Referrals","operationId":"my_referrals_referrals_me_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferralOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requests/quota":{"get":{"tags":["requests"],"summary":"Request Quota","operationId":"request_quota_requests_quota_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestQuotaOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/requests":{"get":{"tags":["requests"],"summary":"List Requests","operationId":"list_requests_requests_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserRequestOut"},"title":"Response List Requests Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["requests"],"summary":"Create Request","operationId":"create_request_requests_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRequestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules":{"get":{"tags":["rules"],"summary":"List Rules","operationId":"list_rules_rules_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RuleOut"},"title":"Response List Rules Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["rules"],"summary":"Create Rule","operationId":"create_rule_rules_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/{rule_id}":{"patch":{"tags":["rules"],"summary":"Update Rule","operationId":"update_rule_rules__rule_id__patch","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["rules"],"summary":"Delete Rule","operationId":"delete_rule_rules__rule_id__delete","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/reorder":{"post":{"tags":["rules"],"summary":"Reorder Rules","description":"Set priority from list position (first = runs first). Ids must all be the\ncaller's; spacing by 10 leaves room to insert between later.","operationId":"reorder_rules_rules_reorder_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleReorder"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RuleOut"},"title":"Response Reorder Rules Rules Reorder Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rules/{rule_id}/test":{"post":{"tags":["rules"],"summary":"Test Rule","description":"Dry-run this one rule against a sample email — no LLM call, no send. Returns\nwhether it matched and the resulting routing plan, for 'explain why it fired'.","operationId":"test_rule_rules__rule_id__test_post","parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/billing":{"get":{"tags":["team"],"summary":"Team Billing","operationId":"team_billing_team_billing_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamBillingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/members":{"get":{"tags":["team"],"summary":"List Members","operationId":"list_members_team_members_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberOut"},"title":"Response List Members Team Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/invites":{"get":{"tags":["team"],"summary":"List Invites","operationId":"list_invites_team_invites_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamInviteOut"},"title":"Response List Invites Team Invites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["team"],"summary":"Invite Member","operationId":"invite_member_team_invites_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInviteIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInviteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/invites/{invite_id}":{"delete":{"tags":["team"],"summary":"Revoke Invite","operationId":"revoke_invite_team_invites__invite_id__delete","parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/members/{member_id}":{"delete":{"tags":["team"],"summary":"Remove Member","operationId":"remove_member_team_members__member_id__delete","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["team"],"summary":"Update Member Role","description":"Promote/demote a member between `admin` and `member`. Owner-only; the\nowner's own role is immutable.","operationId":"update_member_role_team_members__member_id__patch","parameters":[{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberRoleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/seats":{"patch":{"tags":["team"],"summary":"Update Seats","operationId":"update_seats_team_seats_patch","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSeatsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamBillingOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/settings":{"get":{"tags":["team"],"summary":"Team Settings","description":"Readable by any member — the dashboard uses it to gate connection UI.","operationId":"team_settings_team_settings_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["team"],"summary":"Update Team Settings","operationId":"update_team_settings_team_settings_patch","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSettingsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users":{"post":{"tags":["users"],"summary":"Create User","description":"MVP signup: create a user and return their API key ONCE.\n\nReplace with Clerk/Auth0 on the dashboard later; keep API keys for the SDK.","operationId":"create_user_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithKey"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages":{"post":{"tags":["v1"],"summary":"Create Message","description":"Run `instruction` + `content` through an inbox and return the AI result.\n\nSync by default (runs inline, bounded by `api_sync_timeout`); pass `async: true`\nto enqueue and poll `GET /v1/messages/{id}`. `Idempotency-Key` makes retries\nsafe — a repeat returns the original result without re-routing or re-charging.","operationId":"create_message_v1_messages_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages/{message_id}":{"get":{"tags":["v1"],"summary":"Get Message","description":"Poll a previously created API message (for `async` calls or sync timeouts).","operationId":"get_message_v1_messages__message_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1MessageOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/inbound/sendgrid":{"post":{"tags":["webhooks"],"summary":"Sendgrid Inbound","description":"SendGrid Inbound Parse target.\n\nAlways returns 200 quickly. Validation/routing happens in the worker so a\nslow LLM call never causes SendGrid to retry-storm us.","operationId":"sendgrid_inbound_webhooks_inbound_sendgrid_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/inbound/cloudflare":{"post":{"tags":["webhooks"],"summary":"Cloudflare Inbound","description":"Cloudflare Email Worker target.\n\nCloudflare owns the apex MX (Email Routing), so a catch-all Email Worker posts\neach message here as multipart/form-data: `to`/`from` are the SMTP **envelope**\naddresses (so BCC'd hashed addresses match), `spf`/`dkim` are Cloudflare's\nedge-validated verdicts, and `raw` is the full RFC822 message. We parse the\nMIME in Python and hand off to the same `_ingest_inbound` pipeline as SendGrid.","operationId":"cloudflare_inbound_webhooks_inbound_cloudflare_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/stripe":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","description":"Stripe subscription webhook — the source of truth for a user's plan.\n\nUnlike SendGrid Inbound Parse, Stripe SIGNS its payloads, so we verify the\nsignature over the RAW body before trusting anything.","operationId":"stripe_webhook_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/github/marketplace":{"post":{"tags":["webhooks"],"summary":"Github Marketplace Webhook","description":"GitHub Marketplace listing webhook.\n\nAirbox runs a FREE Marketplace listing — billing stays on Stripe and access\nis granted through the normal signup flow — so this handler only verifies the\nsignature, records the event, and acknowledges. (When/if we offer GitHub-\nbilled paid plans, this is where the purchase lifecycle would be applied.)\n\nGitHub SIGNS its payloads, so we verify the HMAC over the RAW body before\ntrusting anything, and always return 200 fast.","operationId":"github_marketplace_webhook_webhooks_github_marketplace_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/webhooks":{"post":{"tags":["webhooks"],"summary":"Create Endpoint","description":"Register an endpoint. Returns the signing secret — store it; it's used to\nverify the `Airbox-Signature` header on every delivery.","operationId":"create_endpoint_v1_webhooks_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["webhooks"],"summary":"List Endpoints","operationId":"list_endpoints_v1_webhooks_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointOut"},"title":"Response List Endpoints V1 Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{endpoint_id}":{"get":{"tags":["webhooks"],"summary":"Get Endpoint","operationId":"get_endpoint_v1_webhooks__endpoint_id__get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["webhooks"],"summary":"Update Endpoint","operationId":"update_endpoint_v1_webhooks__endpoint_id__patch","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete Endpoint","operationId":"delete_endpoint_v1_webhooks__endpoint_id__delete","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{endpoint_id}/secret":{"get":{"tags":["webhooks"],"summary":"Reveal Secret","description":"Reveal the signing secret (the user's own secret, for verifying deliveries).","operationId":"reveal_secret_v1_webhooks__endpoint_id__secret_get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{endpoint_id}/test":{"post":{"tags":["webhooks"],"summary":"Send Test Event","description":"Send a synthetic `message.completed` event (livemode=false) so the developer\ncan confirm reachability + signature verification before real mail relies on\nthe endpoint.","operationId":"send_test_event_v1_webhooks__endpoint_id__test_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{endpoint_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"List Deliveries","operationId":"list_deliveries_v1_webhooks__endpoint_id__deliveries_get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryOut"},"title":"Response List Deliveries V1 Webhooks  Endpoint Id  Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{endpoint_id}/deliveries/{delivery_id}/retry":{"post":{"tags":["webhooks"],"summary":"Retry Delivery","description":"Re-queue a failed delivery. Resets it to pending and enqueues a fresh attempt.","operationId":"retry_delivery_v1_webhooks__endpoint_id__deliveries__delivery_id__retry_post","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"airbox_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Airbox Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Health","operationId":"health_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ApiKeyListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","created_at"],"title":"ApiKeyListItem"},"ApiKeyOut":{"properties":{"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["api_key"],"title":"ApiKeyOut"},"AttachmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"direction":{"type":"string","title":"Direction"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size":{"type":"integer","title":"Size"},"available":{"type":"boolean","title":"Available"}},"type":"object","required":["id","direction","filename","content_type","size","available"],"title":"AttachmentOut","description":"Metadata for one stored attachment. The raw bytes are fetched separately\nvia the download endpoint — never inlined here."},"Body_upload_context_contexts_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_context_contexts_upload_post"},"CheckoutIn":{"properties":{"plan":{"type":"string","pattern":"^(pro|team)$","title":"Plan","default":"pro"},"interval":{"type":"string","pattern":"^(monthly|annual)$","title":"Interval","default":"monthly"},"seats":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Seats"}},"type":"object","title":"CheckoutIn"},"CheckoutOut":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CheckoutOut"},"ConnectionCreate":{"properties":{"type":{"type":"string","pattern":"^(anthropic|openai|gemini|google|mistral|openrouter|perplexity|kimi|moonshot|openai_compat|notion|github|gitlab|slack|mcp)$","title":"Type"},"label":{"type":"string","title":"Label"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"shared":{"type":"boolean","title":"Shared","default":false}},"type":"object","required":["type","label"],"title":"ConnectionCreate"},"ConnectionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"type":"string","title":"Type"},"label":{"type":"string","title":"Label"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"has_secret":{"type":"boolean","title":"Has Secret"},"shared":{"type":"boolean","title":"Shared","default":false},"manageable":{"type":"boolean","title":"Manageable","default":true},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","label","config","has_secret","created_at"],"title":"ConnectionOut"},"ConnectionTestResult":{"properties":{"ok":{"type":"boolean","title":"Ok"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["ok","detail"],"title":"ConnectionTestResult"},"ConnectionUpdate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","title":"ConnectionUpdate"},"ContactCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"type":"string","maxLength":200,"title":"Company","default":""},"message":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Message"},"source":{"type":"string","maxLength":32,"title":"Source","default":"enterprise"},"opened_at":{"type":"integer","minimum":1.0,"title":"Opened At"},"website":{"type":"string","maxLength":200,"title":"Website","default":""}},"type":"object","required":["name","email","opened_at"],"title":"ContactCreate"},"ContactOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"company":{"type":"string","title":"Company"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"source":{"type":"string","title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","email","company","message","source","created_at"],"title":"ContactOut"},"ContextCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"body":{"type":"string","minLength":1,"title":"Body"},"slug":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$|^[a-z0-9]$"},{"type":"null"}],"title":"Slug"},"kind":{"type":"string","pattern":"^(instruction|knowledge|command)$","title":"Kind","default":"instruction"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["title","body"],"title":"ContextCreate"},"ContextOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"kind":{"type":"string","title":"Kind"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","title","body","kind","enabled","created_at","updated_at"],"title":"ContextOut"},"ContextUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Body"},"slug":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$|^[a-z0-9]$"},{"type":"null"}],"title":"Slug"},"kind":{"anyOf":[{"type":"string","pattern":"^(instruction|knowledge|command)$"},{"type":"null"}],"title":"Kind"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"ContextUpdate","description":"Partial update — omit a key to leave it unchanged."},"ConversationDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_at":{"type":"string","format":"date-time","title":"Last At"},"turns":{"items":{"$ref":"#/components/schemas/ConversationTurn"},"type":"array","title":"Turns"}},"type":"object","required":["id","subject","created_at","last_at","turns"],"title":"ConversationDetail"},"ConversationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_at":{"type":"string","format":"date-time","title":"Last At"},"message_count":{"type":"integer","title":"Message Count"},"last_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last From"},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"}},"type":"object","required":["id","subject","created_at","last_at","message_count"],"title":"ConversationOut"},"ConversationPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConversationOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"ConversationPage","description":"One keyset page of threads. `next_cursor` is null when there are no more."},"ConversationTurn":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"from_addr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Addr"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"status":{"type":"string","title":"Status"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentOut"},"type":"array","title":"Attachments","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","from_addr","subject","status","prompt","result","created_at"],"title":"ConversationTurn"},"CustomDomainCreate":{"properties":{"subdomain":{"type":"string","maxLength":63,"minLength":1,"pattern":"^[a-z0-9-]+$","title":"Subdomain","default":"airbox"},"base_domain":{"type":"string","maxLength":253,"minLength":3,"pattern":"^[a-z0-9.-]+\\.[a-z]{2,}$","title":"Base Domain"},"routing_mode":{"type":"string","pattern":"^(catch_all|configured_addresses)$","title":"Routing Mode","default":"configured_addresses"}},"type":"object","required":["base_domain"],"title":"CustomDomainCreate"},"CustomDomainOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subdomain":{"type":"string","title":"Subdomain"},"base_domain":{"type":"string","title":"Base Domain"},"full_domain":{"type":"string","title":"Full Domain"},"status":{"type":"string","title":"Status"},"routing_mode":{"type":"string","title":"Routing Mode"},"dns_records":{"items":{"$ref":"#/components/schemas/DnsRecordOut"},"type":"array","title":"Dns Records"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"}},"type":"object","required":["id","subdomain","base_domain","full_domain","status","routing_mode","dns_records","created_at","verified_at"],"title":"CustomDomainOut"},"DeleteAccountIn":{"properties":{"confirm":{"type":"string","maxLength":64,"minLength":1,"title":"Confirm"}},"type":"object","required":["confirm"],"title":"DeleteAccountIn"},"DnsRecordOut":{"properties":{"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"value":{"type":"string","title":"Value"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["type","name","value"],"title":"DnsRecordOut"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InboxCreate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"default_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default Connection Id"},"auto_route":{"type":"boolean","title":"Auto Route","default":true},"mcp_connection_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Mcp Connection Ids"},"context_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Context Ids"},"allowlist_enabled":{"type":"boolean","title":"Allowlist Enabled","default":true},"allowlist_senders":{"items":{"type":"string"},"type":"array","title":"Allowlist Senders"},"scope":{"additionalProperties":true,"type":"object","title":"Scope"},"route_defaults":{"additionalProperties":true,"type":"object","title":"Route Defaults"},"code_execution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Execution"},"reply_enabled":{"type":"boolean","title":"Reply Enabled","default":true}},"type":"object","title":"InboxCreate"},"InboxOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"local_part":{"type":"string","title":"Local Part"},"address":{"type":"string","title":"Address"},"address_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Prefix"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"active":{"type":"boolean","title":"Active"},"default_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default Connection Id"},"auto_route":{"type":"boolean","title":"Auto Route"},"mcp_connection_ids":{"items":{},"type":"array","title":"Mcp Connection Ids"},"context_ids":{"items":{},"type":"array","title":"Context Ids"},"allowlist_enabled":{"type":"boolean","title":"Allowlist Enabled"},"allowlist_senders":{"items":{},"type":"array","title":"Allowlist Senders"},"scope":{"additionalProperties":true,"type":"object","title":"Scope"},"route_defaults":{"additionalProperties":true,"type":"object","title":"Route Defaults"},"code_execution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Execution"},"reply_enabled":{"type":"boolean","title":"Reply Enabled"},"aggregate_enabled":{"type":"boolean","title":"Aggregate Enabled"},"aggregate_window":{"type":"string","title":"Aggregate Window"},"aggregate_send_at":{"type":"string","title":"Aggregate Send At"},"aggregate_send_dow":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Aggregate Send Dow"},"aggregate_send_dom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Aggregate Send Dom"},"aggregate_timezone":{"type":"string","title":"Aggregate Timezone"},"aggregate_instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregate Instruction"},"aggregate_last_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Aggregate Last Sent At"},"aggregate_buffered_count":{"type":"integer","title":"Aggregate Buffered Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","local_part","address","address_prefix","label","active","default_connection_id","auto_route","mcp_connection_ids","context_ids","allowlist_enabled","allowlist_senders","scope","route_defaults","code_execution","reply_enabled","aggregate_enabled","aggregate_window","aggregate_send_at","aggregate_send_dow","aggregate_send_dom","aggregate_timezone","aggregate_instruction","created_at"],"title":"InboxOut"},"InboxUpdate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefix"},"default_connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default Connection Id"},"auto_route":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Route"},"mcp_connection_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Mcp Connection Ids"},"context_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Context Ids"},"allowlist_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowlist Enabled"},"allowlist_senders":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowlist Senders"},"scope":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scope"},"route_defaults":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Route Defaults"},"code_execution":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Execution"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"reply_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reply Enabled"},"aggregate_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Aggregate Enabled"},"aggregate_window":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly"]},{"type":"null"}],"title":"Aggregate Window"},"aggregate_send_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregate Send At"},"aggregate_send_dow":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Aggregate Send Dow"},"aggregate_send_dom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Aggregate Send Dom"},"aggregate_timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregate Timezone"},"aggregate_instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregate Instruction"}},"type":"object","title":"InboxUpdate","description":"Partial update — only provided fields change. `None` means 'leave as is'\nfor nullable routing fields too, so omit a key to keep it."},"Me":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"has_password":{"type":"boolean","title":"Has Password"},"email_verified":{"type":"boolean","title":"Email Verified"},"plan":{"type":"string","title":"Plan"},"credits_used":{"type":"integer","title":"Credits Used"},"credits_cap":{"type":"integer","title":"Credits Cap"},"referral_credit_bonus":{"type":"integer","title":"Referral Credit Bonus","default":0},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"team_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Role"},"attribution_footer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attribution Footer"},"attribution_footer_locked":{"type":"boolean","title":"Attribution Footer Locked","default":false}},"type":"object","required":["id","email","name","has_password","email_verified","plan","credits_used","credits_cap"],"title":"Me"},"MessageOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"from_addr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Addr"},"to_addr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To Addr"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"status":{"type":"string","title":"Status"},"command":{"additionalProperties":true,"type":"object","title":"Command"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"steps":{"items":{},"type":"array","title":"Steps"},"usage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentOut"},"type":"array","title":"Attachments","default":[]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processed At"}},"type":"object","required":["id","from_addr","to_addr","subject","status","command","result","error","steps","usage","conversation_id","created_at","processed_at"],"title":"MessageOut"},"MessagePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MessageOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"MessagePage","description":"One keyset page of activity. `next_cursor` is null when there are no more."},"PasswordLoginIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"PasswordLoginIn"},"ProfileUpdateIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"organization_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Organization Name"},"attribution_footer":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Attribution Footer"}},"type":"object","title":"ProfileUpdateIn"},"RecipeApplyResult":{"properties":{"recipe_id":{"type":"string","title":"Recipe Id"},"contexts_created":{"type":"integer","title":"Contexts Created"},"rules_created":{"type":"integer","title":"Rules Created"}},"type":"object","required":["recipe_id","contexts_created","rules_created"],"title":"RecipeApplyResult"},"RecipeOut":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"context_count":{"type":"integer","title":"Context Count"},"rule_count":{"type":"integer","title":"Rule Count"}},"type":"object","required":["id","title","description","category","context_count","rule_count"],"title":"RecipeOut"},"ReferralOut":{"properties":{"code":{"type":"string","title":"Code"},"link":{"type":"string","title":"Link"},"signup_rewards":{"type":"integer","title":"Signup Rewards"},"paid_rewards":{"type":"integer","title":"Paid Rewards"},"credit_bonus":{"type":"integer","title":"Credit Bonus"},"signup_credit_reward":{"type":"integer","title":"Signup Credit Reward"}},"type":"object","required":["code","link","signup_rewards","paid_rewards","credit_bonus","signup_credit_reward"],"title":"ReferralOut"},"RegisterIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":256,"minLength":8,"title":"Password"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"referral_code":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Referral Code"}},"type":"object","required":["email","password"],"title":"RegisterIn"},"RegisterOut":{"properties":{"needs_verification":{"type":"boolean","title":"Needs Verification","default":true},"email":{"type":"string","title":"Email"},"retry_after":{"type":"integer","title":"Retry After","default":0}},"type":"object","required":["email"],"title":"RegisterOut"},"RequestCodeIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"referral_code":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Referral Code"}},"type":"object","required":["email"],"title":"RequestCodeIn"},"RequestCodeOut":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"retry_after":{"type":"integer","title":"Retry After","default":0}},"type":"object","title":"RequestCodeOut"},"RequestQuotaOut":{"properties":{"used":{"type":"integer","title":"Used"},"cap":{"type":"integer","title":"Cap"}},"type":"object","required":["used","cap"],"title":"RequestQuotaOut"},"RuleAction":{"properties":{"type":{"type":"string","enum":["route_to","attach_context","attach_tool","set_instruction","set_verb","set_reply","tag","stop"],"title":"Type"},"connection_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connection Id"},"context_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Context Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"verb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verb"},"value":{"anyOf":[{"type":"boolean"},{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["type"],"title":"RuleAction"},"RuleClause":{"properties":{"field":{"type":"string","enum":["from","subject","body","has_attachment"],"title":"Field"},"op":{"type":"string","enum":["contains","equals","matches","is_true","is_false"],"title":"Op"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","required":["field","op"],"title":"RuleClause"},"RuleCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"enabled":{"type":"boolean","title":"Enabled","default":true},"priority":{"type":"integer","title":"Priority","default":100},"match":{"$ref":"#/components/schemas/RuleMatch"},"actions":{"items":{"$ref":"#/components/schemas/RuleAction"},"type":"array","title":"Actions"},"stop_on_match":{"type":"boolean","title":"Stop On Match","default":false}},"type":"object","required":["name"],"title":"RuleCreate"},"RuleMatch":{"properties":{"scope":{"type":"string","enum":["all","any"],"title":"Scope","default":"all"},"inbox_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Inbox Ids"},"clauses":{"items":{"$ref":"#/components/schemas/RuleClause"},"type":"array","title":"Clauses"}},"type":"object","title":"RuleMatch"},"RuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"enabled":{"type":"boolean","title":"Enabled"},"priority":{"type":"integer","title":"Priority"},"match":{"additionalProperties":true,"type":"object","title":"Match"},"actions":{"items":{},"type":"array","title":"Actions"},"stop_on_match":{"type":"boolean","title":"Stop On Match"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","enabled","priority","match","actions","stop_on_match","created_at","updated_at"],"title":"RuleOut"},"RuleReorder":{"properties":{"ordered_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Ordered Ids"}},"type":"object","required":["ordered_ids"],"title":"RuleReorder","description":"Ordered rule ids; index sets the new priority (first = highest)."},"RuleTestRequest":{"properties":{"from_addr":{"type":"string","title":"From Addr","default":""},"subject":{"type":"string","title":"Subject","default":""},"body":{"type":"string","title":"Body","default":""},"has_attachment":{"type":"boolean","title":"Has Attachment","default":false}},"type":"object","title":"RuleTestRequest"},"RuleTestResult":{"properties":{"matched":{"type":"boolean","title":"Matched"},"plan":{"additionalProperties":true,"type":"object","title":"Plan"}},"type":"object","required":["matched","plan"],"title":"RuleTestResult"},"RuleUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"match":{"anyOf":[{"$ref":"#/components/schemas/RuleMatch"},{"type":"null"}]},"actions":{"anyOf":[{"items":{"$ref":"#/components/schemas/RuleAction"},"type":"array"},{"type":"null"}],"title":"Actions"},"stop_on_match":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stop On Match"}},"type":"object","title":"RuleUpdate","description":"Partial update — omit a key to leave it unchanged."},"SetPasswordIn":{"properties":{"password":{"type":"string","maxLength":256,"minLength":8,"title":"Password"}},"type":"object","required":["password"],"title":"SetPasswordIn"},"TeamBillingOut":{"properties":{"seats_billed":{"type":"integer","title":"Seats Billed"},"seats_used":{"type":"integer","title":"Seats Used"},"seats_pending":{"type":"integer","title":"Seats Pending"},"seats_available":{"type":"integer","title":"Seats Available"}},"type":"object","required":["seats_billed","seats_used","seats_pending","seats_available"],"title":"TeamBillingOut"},"TeamInviteIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"TeamInviteIn"},"TeamInviteOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","created_at"],"title":"TeamInviteOut"},"TeamMemberOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["id","email","name","role"],"title":"TeamMemberOut"},"TeamMemberRoleIn":{"properties":{"role":{"type":"string","enum":["admin","member"],"title":"Role"}},"type":"object","required":["role"],"title":"TeamMemberRoleIn"},"TeamSeatsIn":{"properties":{"seats":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Seats"}},"type":"object","required":["seats"],"title":"TeamSeatsIn"},"TeamSettingsIn":{"properties":{"allow_member_connections":{"type":"boolean","title":"Allow Member Connections"}},"type":"object","required":["allow_member_connections"],"title":"TeamSettingsIn"},"TeamSettingsOut":{"properties":{"allow_member_connections":{"type":"boolean","title":"Allow Member Connections"},"role":{"type":"string","title":"Role"},"is_manager":{"type":"boolean","title":"Is Manager"}},"type":"object","required":["allow_member_connections","role","is_manager"],"title":"TeamSettingsOut"},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["email"],"title":"UserCreate"},"UserRequestCreate":{"properties":{"category":{"type":"string","pattern":"^(connection|airbox|logging|other)$","title":"Category"},"message":{"type":"string","maxLength":2000,"minLength":10,"title":"Message"}},"type":"object","required":["category","message"],"title":"UserRequestCreate"},"UserRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"category":{"type":"string","title":"Category"},"message":{"type":"string","title":"Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","category","message","created_at"],"title":"UserRequestOut"},"UserWithKey":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["id","email","name","api_key"],"title":"UserWithKey"},"V1AttachmentIn":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"data":{"type":"string","title":"Data"}},"type":"object","required":["filename","content_type","data"],"title":"V1AttachmentIn","description":"An inbound attachment supplied on an API call — UNTRUSTED, handled exactly\nlike an email attachment (PDF/text extracted, images sent to a vision model)."},"V1AttachmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"direction":{"type":"string","title":"Direction"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size":{"type":"integer","title":"Size"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","direction","filename","content_type","size","url"],"title":"V1AttachmentOut"},"V1Credits":{"properties":{"charged":{"type":"integer","title":"Charged"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["charged","remaining"],"title":"V1Credits"},"V1MessageCreate":{"properties":{"instruction":{"type":"string","maxLength":10000,"minLength":1,"title":"Instruction"},"content":{"type":"string","title":"Content","default":""},"inbox_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Inbox Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"attachments":{"items":{"$ref":"#/components/schemas/V1AttachmentIn"},"type":"array","title":"Attachments"},"async":{"type":"boolean","title":"Async","default":false}},"type":"object","required":["instruction"],"title":"V1MessageCreate","description":"Run content through one of the caller's inboxes and get the AI result back.\n\n`instruction` is the AUTHORITY surface (the same role as an email's subject +\nfirst line — it may carry the command DSL: `@target`, flags, `+context`,\n`#tags`, `$macro`). `content` is UNTRUSTED DATA: read, never obeyed."},"V1MessageOut":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"usage":{"anyOf":[{"$ref":"#/components/schemas/V1Usage"},{"type":"null"}]},"steps":{"items":{},"type":"array","title":"Steps"},"attachments":{"items":{"$ref":"#/components/schemas/V1AttachmentOut"},"type":"array","title":"Attachments"},"credits":{"anyOf":[{"$ref":"#/components/schemas/V1Credits"},{"type":"null"}]}},"type":"object","required":["message_id","status"],"title":"V1MessageOut","description":"Result envelope. Flat and predictable so Zapier/Make/n8n/Apify can map\nfields directly. `status`: done | failed | limited | skipped | processing."},"V1Usage":{"properties":{"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"}},"type":"object","title":"V1Usage"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyCodeIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","maxLength":12,"minLength":4,"title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyCodeIn"},"WebhookDeliveryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status"},"response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Body"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"}},"type":"object","required":["id","event_id","event_type","status","attempts","created_at"],"title":"WebhookDeliveryOut"},"WebhookEndpointCreate":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"}},"type":"object","required":["url"],"title":"WebhookEndpointCreate"},"WebhookEndpointOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"enabled":{"type":"boolean","title":"Enabled"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disabled At"}},"type":"object","required":["id","url","description","event_types","enabled","consecutive_failures","created_at"],"title":"WebhookEndpointOut"},"WebhookEndpointUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"event_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Event Types"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"WebhookEndpointUpdate"},"WebhookEndpointWithSecret":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"enabled":{"type":"boolean","title":"Enabled"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disabled At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","url","description","event_types","enabled","consecutive_failures","created_at","secret"],"title":"WebhookEndpointWithSecret","description":"Returned on create and on explicit reveal — the signing secret in clear."}}}}