{"info":{"title":"Workwae API","version":"1.0.0","description":"Email, calendar and contacts sync for Gmail and Microsoft 365 accounts, and email sync for\nany IMAP/SMTP mailbox.\n\nAuthenticate with `Authorization: Bearer wk_...` (an API key with read, write, send or admin\nscope) or, for `GET /v1/accounts/{accountId}` and the account's mail, calendar and contacts\nroutes (`/v1/accounts/{accountId}/...` under Mail, Identities, Calendar and Contacts), a\nshort-lived account token (`Bearer wat_...`) that acts with every scope on that one account.\n\nErrors answer with `{ defined, code, status, message, data? }`. `code` is the error's\nstable reason (snake_case, e.g. `plan_limit_accounts`); each reason always comes with the\nsame HTTP status; `message` is for people; `data` is present only for the reasons that\ncarry structured details (e.g. `invalid_input` lists `data.issues`). Each operation's\nresponses list the reasons it answers with, each with the condition it is answered on.\nEvery operation can also answer `invalid_input` (400), `unauthenticated` (401),\n`missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`\nand `mcp_only_key` (403), `payload_too_large` (413), `rate_limited` and\n`too_many_requests` (429),\n`internal_error` (500) and `overloaded` (503).\n\nCalendar routes answer `calendar_disabled` while the account's calendar sync is off\n(`settings.calendarEnabled`), contacts routes `contacts_disabled` while its contacts sync\nis off (`settings.contactsEnabled`); IMAP accounts have them only through their CalDAV\nand CardDAV settings.\n\nEvery response carries `X-Request-Id`. Send your own (1 to 128 of `A-Z a-z 0-9 . _ : -`)\nand it is echoed back; otherwise, or when it does not fit, the API generates one. Quote it\nwhen you contact support: it names the request in our logs and in the audit log.\n\nAuthenticated `POST` operations take an `Idempotency-Key` header (1 to 255 printable ASCII\ncharacters, e.g. a UUID). The first answer to a key is kept for 24 hours for your tenant:\nsending the same key, method, path and body again answers it again, with\n`Idempotent-Replayed: true`, instead of acting twice. The same key with another method,\npath or body answers `idempotency_key_reused` (422); while the first request still runs,\n`idempotency_key_in_progress` (409). A 5xx or 429 answer is not kept, so retrying with the\nsame key runs the request again. Other methods ignore the header.\n\nEvery tenant runs under a plan (`GET /v1/usage` shows it). Requests over its API rate,\ncounted per minute for the tenant and for each credential, answer `rate_limited` with a\n`Retry-After` header. Every call counted against the rate answers `RateLimit-Limit`,\n`RateLimit-Remaining` and `RateLimit-Reset` (seconds until the window ends), for whichever\nof the two windows has fewer requests left. Creations beyond its limits answer\n`plan_limit_accounts`, `plan_limit_sends`, `plan_limit_webhooks` or `plan_limit_storage`;\na connect flow stopped by the account limit returns to your `redirectUri` with\n`status=error&error=plan_limit_accounts`.\n\nA plan also names its modules (`plan.limits.modules`): calendar, contacts, tracking, ai,\nmeetings and sharedMailboxes; mail is always included. Routes of a module the plan lacks\n(Calendar, Contacts, meeting apps and connections, shared mailboxes, AI drafts, and\ntracking asked for on a send) answer `plan_module_unavailable`. Without\nthe module its settings have no effect: no calendar or contacts sync, no calendar or\ncontacts scopes on connect, no tracking defaults on sends, no reply classification.\nShared-mailbox accounts added before the plan lost sharedMailboxes keep syncing and\nsending like any other account; only adding new ones (and asking for the shared mailbox\nscope on connect) is refused.\n\nBeyond the plan, each API process limits how much of it one caller takes. Past 16\nrequests in flight for one credential (a download counts until its body is sent), a\nrequest answers `too_many_requests`; when the process is overloaded, `overloaded`. Both\ncarry `Retry-After`, and neither did anything, so retrying after it is safe. A client\naddress that fails authentication too often in a minute has its bearer tokens refused\nwith `rate_limited` until the minute ends, except API keys that authenticated recently.\nDownloads are sent chunked, without `Content-Length`: sizes are in the message's `size`,\neach attachment's `size` and an export's `bytes`.\n\nOAuth redirect URI: register\n`https://api.workwae.com/connect/callback/google` and `https://api.workwae.com/connect/callback/microsoft`\nwith your own OAuth apps (one Microsoft app per cloud). The same callbacks serve the\nplatform apps. After sign-in the user returns to your `redirectUri` (which must be listed\nin `settings.redirectUris`) with `status=success&account_id=...&state=...` or\n`status=error&error=<code>&state=...`. A hosted session without one ends on Workwae's own\nconfirmation page; read its outcome with `GET /v1/connect-sessions/{sessionId}`."},"servers":[{"url":"https://api.workwae.com"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key or account token"}},"schemas":{"EventId":{"type":"string","pattern":"^[0-9]{1,19}$"},"Address":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"type":"string"}},"required":["name","address"]},"AddressInput":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"address":{"type":"string","maxLength":320,"format":"email"}},"required":["address"]},"TemplateSource":{"enum":["handlebars","react-email"],"type":"string"},"TemplateFormat":{"enum":["html","markdown"],"type":"string"},"TemplateField":{"enum":["subject","html","text","previewText"],"type":"string"},"TemplateSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"$ref":"#/components/schemas/TemplateSource"},"externalRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","accountId","name","description","source","externalRef","createdAt","updatedAt"]},"Template":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"$ref":"#/components/schemas/TemplateSource"},"externalRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"subject":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"html":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]},"text":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]},"previewText":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"format":{"$ref":"#/components/schemas/TemplateFormat"}},"required":["id","accountId","name","description","source","externalRef","createdAt","updatedAt","subject","html","text","previewText","format"]},"TemplateSummaryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TemplateSummary"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"RenderParams":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"RenderedTemplate":{"type":"object","properties":{"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"html":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"previewText":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["subject","html","text","previewText"]},"CreateTemplate":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"subject":{"type":"string","maxLength":2000},"html":{"type":"string","maxLength":1000000},"text":{"type":"string","maxLength":1000000},"previewText":{"type":"string","maxLength":2000},"format":{"$ref":"#/components/schemas/TemplateFormat","default":"html"},"source":{"$ref":"#/components/schemas/TemplateSource","default":"handlebars"},"externalRef":{"type":"string","maxLength":255}},"required":["name"]},"RenderTemplateRequest":{"type":"object","properties":{"templateId":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"subject":{"type":"string","maxLength":2000},"html":{"type":"string","maxLength":1000000},"text":{"type":"string","maxLength":1000000},"previewText":{"type":"string","maxLength":2000},"format":{"$ref":"#/components/schemas/TemplateFormat"},"params":{"$ref":"#/components/schemas/RenderParams","default":{}}}},"InputIssue":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["path","message"]},"InvalidInputData":{"type":"object","properties":{"issues":{"type":"array","items":{"$ref":"#/components/schemas/InputIssue"}}},"required":["issues"]},"UnknownIdsData":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["ids"]},"TemplateFieldData":{"type":"object","properties":{"field":{"$ref":"#/components/schemas/TemplateField"}},"required":["field"]},"MailboxRole":{"enum":["inbox","sent","drafts","trash","junk","archive","all","important","custom"],"type":"string"},"MailboxKind":{"enum":["folder","label"],"type":"string"},"Mailbox":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"path":{"type":"string"},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"role":{"$ref":"#/components/schemas/MailboxRole"},"kind":{"$ref":"#/components/schemas/MailboxKind"},"totalCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"unreadCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","name","path","parentId","role","kind","totalCount","unreadCount"]},"MailboxList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Mailbox"}}},"required":["items"]},"MailboxChangedField":{"enum":["name","path","parentId","role","kind"],"type":"string"},"MessageDirection":{"enum":["inbound","outbound"],"type":"string"},"MessagePriority":{"enum":["high","normal","low"],"type":"string"},"MessageSummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"threadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"internetMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mailboxIds":{"type":"array","items":{"type":"string","format":"uuid"}},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"cc":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"isRead":{"type":"boolean"},"isFlagged":{"type":"boolean"},"isDraft":{"type":"boolean"},"hasAttachments":{"type":"boolean"},"categories":{"type":"array","items":{"type":"string"}},"direction":{"$ref":"#/components/schemas/MessageDirection"},"outboxId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"importance":{"anyOf":[{"$ref":"#/components/schemas/MessagePriority"},{"type":"null"}]}},"required":["id","threadId","internetMessageId","mailboxIds","subject","from","to","cc","snippet","receivedAt","sentAt","isRead","isFlagged","isDraft","hasAttachments","categories","direction","outboxId","reference","importance"]},"MessageChangedField":{"enum":["threadId","internetMessageId","subject","from","to","cc","bcc","replyTo","snippet","receivedAt","sentAt","isRead","isFlagged","isDraft","hasAttachments","categories","mailboxIds","direction","outboxId","importance"],"type":"string"},"MessageSummaryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MessageSummary"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"Attachment":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":1024},"filename":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"type":"string"},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"isInline":{"type":"boolean"},"contentId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","filename","contentType","size","isInline","contentId"]},"ReplyKind":{"enum":["opt_out","auto_reply","bounce","human_reply"],"type":"string"},"AutoReplyCategory":{"enum":["out_of_office","left_company","address_changed","ticket_acknowledgment","challenge_response","other"],"type":"string"},"MessageClassification":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/ReplyKind"},"probabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"optOutProbability":{"type":"number"},"autoReplyCategory":{"anyOf":[{"$ref":"#/components/schemas/AutoReplyCategory"},{"type":"null"}]},"returnDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"alternateContacts":{"type":"array","items":{"type":"string"}},"outboxId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"model":{"type":"string"},"classifiedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","probabilities","optOutProbability","autoReplyCategory","returnDate","alternateContacts","outboxId","model","classifiedAt"]},"MessageBody":{"type":"object","properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"html":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["text","html"]},"Message":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"threadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"internetMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mailboxIds":{"type":"array","items":{"type":"string","format":"uuid"}},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"cc":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"isRead":{"type":"boolean"},"isFlagged":{"type":"boolean"},"isDraft":{"type":"boolean"},"hasAttachments":{"type":"boolean"},"categories":{"type":"array","items":{"type":"string"}},"direction":{"$ref":"#/components/schemas/MessageDirection"},"outboxId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"importance":{"anyOf":[{"$ref":"#/components/schemas/MessagePriority"},{"type":"null"}]},"bcc":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"replyTo":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"body":{"$ref":"#/components/schemas/MessageBody"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"classification":{"anyOf":[{"$ref":"#/components/schemas/MessageClassification"},{"type":"null"}]}},"required":["id","threadId","internetMessageId","mailboxIds","subject","from","to","cc","snippet","receivedAt","sentAt","isRead","isFlagged","isDraft","hasAttachments","categories","direction","outboxId","reference","importance","bcc","replyTo","body","attachments","classification"]},"SearchSource":{"enum":["auto","index","provider"],"type":"string"},"SearchResultSource":{"enum":["index","provider"],"type":"string"},"SearchHit":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"internetMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"mailboxIds":{"type":"array","items":{"type":"string","format":"uuid"}},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"from":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"to":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"cc":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"isRead":{"type":"boolean"},"isFlagged":{"type":"boolean"},"isDraft":{"type":"boolean"},"hasAttachments":{"type":"boolean"},"categories":{"type":"array","items":{"type":"string"}},"direction":{"$ref":"#/components/schemas/MessageDirection"},"outboxId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"importance":{"anyOf":[{"$ref":"#/components/schemas/MessagePriority"},{"type":"null"}]}},"required":["id","threadId","internetMessageId","mailboxIds","subject","from","to","cc","snippet","receivedAt","sentAt","isRead","isFlagged","isDraft","hasAttachments","categories","direction","outboxId","reference","importance"]},"SearchPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"source":{"$ref":"#/components/schemas/SearchResultSource"}},"required":["items","nextCursor","source"]},"PlanModules":{"type":"object","properties":{"calendar":{"type":"boolean"},"contacts":{"type":"boolean"},"tracking":{"type":"boolean"},"ai":{"type":"boolean"},"meetings":{"type":"boolean"},"sharedMailboxes":{"type":"boolean"}},"required":["calendar","contacts","tracking","ai","meetings","sharedMailboxes"]},"PlanIncluded":{"type":"object","properties":{"accounts":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sendsPerMonth":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"aiCallsPerMonth":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"storageBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["accounts","sendsPerMonth","aiCallsPerMonth","storageBytes"]},"PlanStripePrices":{"type":"object","properties":{"basePrice":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^price_[A-Za-z0-9]+$"},{"type":"null"}]},"accountPrice":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^price_[A-Za-z0-9]+$"},{"type":"null"}]},"sendsPrice":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^price_[A-Za-z0-9]+$"},{"type":"null"}]},"aiCallsPrice":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^price_[A-Za-z0-9]+$"},{"type":"null"}]},"storagePrice":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^price_[A-Za-z0-9]+$"},{"type":"null"}]}},"required":["basePrice","accountPrice","sendsPrice","aiCallsPrice","storagePrice"]},"PlanPricing":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[a-z]{3}$"},"baseMonthly":{"type":"integer","minimum":0,"maximum":9007199254740991},"perAccountMonthly":{"type":"integer","minimum":0,"maximum":9007199254740991},"sendsPer1k":{"type":"integer","minimum":0,"maximum":9007199254740991},"aiCallsPer1k":{"type":"integer","minimum":0,"maximum":9007199254740991},"storagePerGbMonth":{"type":"integer","minimum":0,"maximum":9007199254740991},"stripe":{"$ref":"#/components/schemas/PlanStripePrices"}},"required":["currency","baseMonthly","perAccountMonthly","sendsPer1k","aiCallsPer1k","storagePerGbMonth","stripe"]},"PlanLimits":{"type":"object","properties":{"maxAccounts":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sendsPerDay":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"apiCallsPerMinute":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"apiCallsPerMinutePerKey":{"anyOf":[{"type":"integer","minimum":1,"maximum":9007199254740991},{"type":"null"}]},"webhookEndpoints":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"bodyStorageAllowed":{"type":"boolean"},"storageBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"modules":{"$ref":"#/components/schemas/PlanModules"},"included":{"$ref":"#/components/schemas/PlanIncluded"},"pricing":{"anyOf":[{"$ref":"#/components/schemas/PlanPricing"},{"type":"null"}]}},"required":["maxAccounts","sendsPerDay","apiCallsPerMinute","apiCallsPerMinutePerKey","webhookEndpoints","bodyStorageAllowed","storageBytes","modules","included","pricing"]},"EffectivePlan":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"name":{"type":"string"},"limits":{"$ref":"#/components/schemas/PlanLimits"}},"required":["id","name","limits"]},"UsageDay":{"type":"object","properties":{"day":{"type":"string","format":"date"},"liveAccounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"apiCalls":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"sends":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"webhookDeliveries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"aiCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"storedBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["day","liveAccounts","apiCalls","sends","webhookDeliveries","aiCalls","storedBytes"]},"CurrentUsage":{"type":"object","properties":{"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"webhookEndpoints":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sendsToday":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"storedBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["accounts","webhookEndpoints","sendsToday","storedBytes"]},"Usage":{"type":"object","properties":{"plan":{"$ref":"#/components/schemas/EffectivePlan"},"current":{"$ref":"#/components/schemas/CurrentUsage"},"days":{"type":"array","items":{"$ref":"#/components/schemas/UsageDay"}}},"required":["plan","current","days"]},"BodyStorage":{"enum":["none","cache","full"],"type":"string"},"EffectiveSettings":{"type":"object","properties":{"bodyStorage":{"$ref":"#/components/schemas/BodyStorage"},"syncWindowDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"calendarEnabled":{"type":"boolean"},"contactsEnabled":{"type":"boolean"},"undoSendSeconds":{"type":"integer","minimum":0,"maximum":60},"trackOpens":{"type":"boolean"},"trackClicks":{"type":"boolean"},"trackingHoneypot":{"type":"boolean"}},"required":["bodyStorage","syncWindowDays","calendarEnabled","contactsEnabled","undoSendSeconds","trackOpens","trackClicks","trackingHoneypot"]},"SettingsOverride":{"type":"object","properties":{"bodyStorage":{"$ref":"#/components/schemas/BodyStorage"},"syncWindowDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"calendarEnabled":{"type":"boolean"},"contactsEnabled":{"type":"boolean"},"undoSendSeconds":{"type":"integer","minimum":0,"maximum":60},"trackOpens":{"type":"boolean"},"trackClicks":{"type":"boolean"},"trackingHoneypot":{"type":"boolean"}}},"OptOutHandling":{"enum":["off","review","suppress"],"type":"string"},"TenantSettings":{"type":"object","properties":{"bodyStorage":{"$ref":"#/components/schemas/BodyStorage"},"syncWindowDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"calendarEnabled":{"type":"boolean"},"contactsEnabled":{"type":"boolean"},"undoSendSeconds":{"type":"integer","minimum":0,"maximum":60},"trackOpens":{"type":"boolean"},"trackClicks":{"type":"boolean"},"trackingHoneypot":{"type":"boolean"},"optOutHandling":{"$ref":"#/components/schemas/OptOutHandling"},"eventRetentionDays":{"type":"integer","minimum":7,"maximum":30},"redirectUris":{"type":"array","maxItems":50,"items":{"type":"string","format":"uri"}},"aiReplyClassification":{"type":"boolean"}},"required":["bodyStorage","syncWindowDays","calendarEnabled","contactsEnabled","undoSendSeconds","trackOpens","trackClicks","trackingHoneypot","optOutHandling","eventRetentionDays","redirectUris","aiReplyClassification"]},"UpdateTenantSettings":{"type":"object","properties":{"bodyStorage":{"$ref":"#/components/schemas/BodyStorage"},"syncWindowDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}]},"calendarEnabled":{"type":"boolean"},"contactsEnabled":{"type":"boolean"},"undoSendSeconds":{"type":"integer","minimum":0,"maximum":60},"trackOpens":{"type":"boolean"},"trackClicks":{"type":"boolean"},"trackingHoneypot":{"type":"boolean"},"optOutHandling":{"$ref":"#/components/schemas/OptOutHandling"},"eventRetentionDays":{"type":"integer","minimum":7,"maximum":30},"redirectUris":{"type":"array","maxItems":50,"items":{"type":"string","format":"uri"}},"aiReplyClassification":{"type":"boolean"}}},"OAuthProvider":{"enum":["google","microsoft"],"type":"string"},"MicrosoftCloud":{"enum":["global","gcc-high","dod","china"],"type":"string"},"AccountProvider":{"enum":["gmail","graph","imap"],"type":"string"},"AccountStatus":{"enum":["active","paused","reauth_required","disabled"],"type":"string"},"SettableAccountStatus":{"enum":["active","paused"],"type":"string"},"RuntimeState":{"enum":["pending","connecting","connected","error","stopped"],"type":"string"},"AccountRuntime":{"type":"object","properties":{"state":{"$ref":"#/components/schemas/RuntimeState"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]},"ownerInstanceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["state","detail","ownerInstanceId","updatedAt"]},"MailSecurity":{"enum":["tls","starttls","none"],"type":"string"},"MailServer":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"security":{"$ref":"#/components/schemas/MailSecurity"},"user":{"type":"string"}},"required":["host","port","security","user"]},"DavAuth":{"enum":["imap_password","dav_password"],"type":"string"},"DavSettings":{"type":"object","properties":{"calendarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"user":{"type":"string"},"auth":{"$ref":"#/components/schemas/DavAuth"}},"required":["calendarUrl","contactsUrl","user","auth"]},"ImapAuth":{"enum":["password","google","microsoft"],"type":"string"},"ImapSettings":{"type":"object","properties":{"imap":{"$ref":"#/components/schemas/MailServer"},"smtp":{"anyOf":[{"$ref":"#/components/schemas/MailServer"},{"type":"null"}]},"auth":{"$ref":"#/components/schemas/ImapAuth"},"appendSent":{"type":"boolean"},"dav":{"anyOf":[{"$ref":"#/components/schemas/DavSettings"},{"type":"null"}]}},"required":["imap","smtp","auth","appendSent","dav"]},"AccountAuthMethod":{"enum":["oauth","password","google_delegation","microsoft_app","shared_mailbox"],"type":"string"},"AccountAuth":{"type":"object","properties":{"method":{"$ref":"#/components/schemas/AccountAuthMethod"},"orgConnectionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"delegateAccountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["method","orgConnectionId","delegateAccountId"]},"Account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider":{"$ref":"#/components/schemas/AccountProvider"},"email":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"oauthAppId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"cloud":{"anyOf":[{"$ref":"#/components/schemas/MicrosoftCloud"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/AccountStatus"},"statusReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"settings":{"$ref":"#/components/schemas/EffectiveSettings"},"settingsOverride":{"$ref":"#/components/schemas/SettingsOverride"},"runtime":{"anyOf":[{"$ref":"#/components/schemas/AccountRuntime"},{"type":"null"}]},"imap":{"anyOf":[{"$ref":"#/components/schemas/ImapSettings"},{"type":"null"}]},"auth":{"$ref":"#/components/schemas/AccountAuth"},"initializedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"calendarInitializedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"contactsInitializedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","externalRef","provider","email","displayName","oauthAppId","cloud","status","statusReason","settings","settingsOverride","runtime","imap","auth","initializedAt","calendarInitializedAt","contactsInitializedAt","createdAt","updatedAt"]},"AccountPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"CreateAccount":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/OAuthProvider"},"microsoftCloud":{"$ref":"#/components/schemas/MicrosoftCloud","default":"global"},"refreshToken":{"type":"string","minLength":1},"oauthAppId":{"type":"string","format":"uuid"},"externalRef":{"type":"string","maxLength":255},"settings":{"$ref":"#/components/schemas/SettingsOverride"},"sharedMailboxesEnabled":{"type":"boolean"}},"required":["provider","refreshToken"]},"AccountToken":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["token","expiresAt"]},"MailServerInput":{"type":"object","properties":{"host":{"type":"string","minLength":1,"maxLength":253},"port":{"type":"integer","minimum":1,"maximum":65535},"security":{"$ref":"#/components/schemas/MailSecurity"},"user":{"type":"string","minLength":1,"maxLength":320}},"required":["host","port","security"]},"DavInput":{"type":"object","properties":{"calendarUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"contactsUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"user":{"type":"string","minLength":1,"maxLength":320},"password":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]}}},"CreateImapAccount":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"displayName":{"type":"string","maxLength":255},"password":{"type":"string","minLength":1,"maxLength":1024},"smtpPassword":{"type":"string","minLength":1,"maxLength":1024},"imap":{"$ref":"#/components/schemas/MailServerInput"},"smtp":{"anyOf":[{"$ref":"#/components/schemas/MailServerInput"},{"type":"null"}]},"appendSent":{"type":"boolean"},"dav":{"$ref":"#/components/schemas/DavInput"},"externalRef":{"type":"string","maxLength":255},"settings":{"$ref":"#/components/schemas/SettingsOverride"}},"required":["email","password"]},"DavDiscoverySource":{"enum":["provider","well-known","srv"],"type":"string"},"DiscoveredDav":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/DavDiscoverySource"},"calendarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"contactsUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["source","calendarUrl","contactsUrl"]},"AutoconfigSource":{"enum":["provider","autoconfig","ispdb","srv","mx"],"type":"string"},"DiscoveredSettings":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/AutoconfigSource"},"imap":{"$ref":"#/components/schemas/MailServer"},"smtp":{"anyOf":[{"$ref":"#/components/schemas/MailServer"},{"type":"null"}]},"oauth":{"anyOf":[{"$ref":"#/components/schemas/OAuthProvider"},{"type":"null"}]},"dav":{"anyOf":[{"$ref":"#/components/schemas/DiscoveredDav"},{"type":"null"}]}},"required":["source","imap","smtp","oauth","dav"]},"McpKeyScope":{"enum":["read","write","send"],"type":"string"},"McpKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/McpKeyScope"}},"accountId":{"type":"string","format":"uuid"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","prefix","scopes","accountId","expiresAt","createdAt","lastUsedAt"]},"McpKeyList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/McpKey"}}},"required":["items"]},"CreatedMcpKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/McpKeyScope"}},"accountId":{"type":"string","format":"uuid"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"key":{"type":"string"},"mcpUrl":{"type":"string","format":"uri"}},"required":["id","name","prefix","scopes","accountId","expiresAt","createdAt","lastUsedAt","key","mcpUrl"]},"ConnectSessionMcp":{"type":"object","properties":{"scopes":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/McpKeyScope"}},"name":{"type":"string","minLength":1,"maxLength":100,"default":"MCP"}},"required":["scopes"]},"MailAccess":{"enum":["api","imap"],"type":"string"},"ConnectOptions":{"type":"object","properties":{"calendarEnabled":{"type":"boolean"},"contactsEnabled":{"type":"boolean"},"bodyStorage":{"$ref":"#/components/schemas/BodyStorage"},"mailAccess":{"$ref":"#/components/schemas/MailAccess"},"sharedMailboxesEnabled":{"type":"boolean"}}},"ConnectProvider":{"enum":["google","microsoft","imap"],"type":"string"},"ConnectSessionStatus":{"enum":["pending","completed","failed"],"type":"string"},"ConnectErrorCode":{"enum":["session_used","session_expired","provider_not_allowed","access_denied","access_token_rejected","provider_error","provider_unavailable","provider_not_configured","unsupported_provider","token_exchange_failed","invalid_client","invalid_grant","missing_refresh_token","scope_denied","identity_failed","identity_unavailable","credential_conflict","credential_missing","delegate_missing","account_exists","account_mismatch","account_not_found","unknown_oauth_app","oauth_app_mismatch","oauth_app_secret_unreadable","google_imap_requires_own_app","unknown_meeting_app","meeting_app_mismatch","meeting_app_secret_unreadable","consent_failed","consent_required","consent_revoked","consent_unverified","directory_already_connected","directory_mismatch","directory_unavailable","invalid_certificate","invalid_service_account_key","org_connection_not_found","org_connection_secret_unreadable","plan_limit_accounts","plan_module_unavailable","billing_past_due","internal_error"],"type":"string"},"ConnectSessionPublic":{"type":"object","properties":{"tenantName":{"type":"string"},"providers":{"type":"array","items":{"$ref":"#/components/schemas/ConnectProvider"}},"microsoftCloud":{"$ref":"#/components/schemas/MicrosoftCloud"},"status":{"$ref":"#/components/schemas/ConnectSessionStatus"},"reauthEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"loginHint":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["tenantName","providers","microsoftCloud","status","reauthEmail","loginHint","expiresAt"]},"ConnectSession":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/ConnectSessionStatus"},"error":{"anyOf":[{"$ref":"#/components/schemas/ConnectErrorCode"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"mcpKeyId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","status","error","accountId","email","mcpKeyId","expiresAt","createdAt"]},"CreateConnectSession":{"type":"object","properties":{"redirectUri":{"type":"string","format":"uri"},"providers":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ConnectProvider"},"default":["google","microsoft"]},"microsoftCloud":{"$ref":"#/components/schemas/MicrosoftCloud","default":"global"},"oauthAppIds":{"type":"object","properties":{"google":{"type":"string","format":"uuid"},"microsoft":{"type":"string","format":"uuid"}}},"externalRef":{"type":"string","maxLength":255},"loginHint":{"type":"string","maxLength":320,"format":"email"},"state":{"type":"string","maxLength":1024},"accountId":{"type":"string","format":"uuid"},"options":{"$ref":"#/components/schemas/ConnectOptions"},"mcp":{"$ref":"#/components/schemas/ConnectSessionMcp"},"ttlSeconds":{"type":"integer","minimum":60,"maximum":86400,"default":3600}}},"SessionLink":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","expiresAt"]},"StartOAuthRequest":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/OAuthProvider"},"redirectUri":{"type":"string","format":"uri"},"microsoftCloud":{"$ref":"#/components/schemas/MicrosoftCloud","default":"global"},"oauthAppId":{"type":"string","format":"uuid"},"externalRef":{"type":"string","maxLength":255},"state":{"type":"string","maxLength":1024},"accountId":{"type":"string","format":"uuid"},"options":{"$ref":"#/components/schemas/ConnectOptions"}},"required":["provider","redirectUri"]},"OAuthAuthorization":{"type":"object","properties":{"authorizeUrl":{"type":"string","format":"uri"}},"required":["authorizeUrl"]},"HostedImapResult":{"type":"object","properties":{"redirectUrl":{"type":"string","format":"uri"}},"required":["redirectUrl"]},"MeetingService":{"enum":["zoom","webex"],"type":"string"},"MeetingConnectionStatus":{"enum":["active","reauth_required"],"type":"string"},"MeetingConnection":{"type":"object","properties":{"service":{"$ref":"#/components/schemas/MeetingService"},"email":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"meetingAppId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/MeetingConnectionStatus"},"statusReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["service","email","displayName","meetingAppId","status","statusReason","createdAt","updatedAt"]},"MeetingConnectionList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MeetingConnection"}}},"required":["items"]},"MeetingAppKind":{"enum":["zoom_oauth","zoom_s2s","webex_oauth","webex_service_app"],"type":"string"},"MeetingAppStatus":{"enum":["unverified","active","failing"],"type":"string"},"MeetingApp":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/MeetingAppKind"},"service":{"$ref":"#/components/schemas/MeetingService"},"name":{"type":"string"},"clientId":{"type":"string"},"zoomAccountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/MeetingAppStatus"},{"type":"null"}]},"statusDetail":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"redirectUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","service","name","clientId","zoomAccountId","status","statusDetail","checkedAt","scopes","redirectUri","createdAt"]},"MeetingAppList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MeetingApp"}}},"required":["items"]},"CreateMeetingApp":{"anyOf":[{"type":"object","properties":{"kind":{"const":"zoom_oauth"},"name":{"type":"string","minLength":1,"maxLength":100},"clientId":{"type":"string","minLength":1,"maxLength":200},"clientSecret":{"type":"string","minLength":1,"maxLength":1024}},"required":["kind","name","clientId","clientSecret"]},{"type":"object","properties":{"kind":{"const":"zoom_s2s"},"name":{"type":"string","minLength":1,"maxLength":100},"accountId":{"type":"string","minLength":1,"maxLength":200},"clientId":{"type":"string","minLength":1,"maxLength":200},"clientSecret":{"type":"string","minLength":1,"maxLength":1024}},"required":["kind","name","accountId","clientId","clientSecret"]},{"type":"object","properties":{"kind":{"const":"webex_oauth"},"name":{"type":"string","minLength":1,"maxLength":100},"clientId":{"type":"string","minLength":1,"maxLength":200},"clientSecret":{"type":"string","minLength":1,"maxLength":1024}},"required":["kind","name","clientId","clientSecret"]},{"type":"object","properties":{"kind":{"const":"webex_service_app"},"name":{"type":"string","minLength":1,"maxLength":100},"clientId":{"type":"string","minLength":1,"maxLength":200},"clientSecret":{"type":"string","minLength":1,"maxLength":1024},"refreshToken":{"type":"string","minLength":1,"maxLength":4096}},"required":["kind","name","clientId","clientSecret","refreshToken"]}]},"MeetingAppCheck":{"type":"object","properties":{"name":{"type":"string"},"isOk":{"type":"boolean"},"detail":{"type":"string"}},"required":["name","isOk","detail"]},"MeetingAppTestResult":{"type":"object","properties":{"app":{"$ref":"#/components/schemas/MeetingApp"},"checks":{"type":"array","items":{"$ref":"#/components/schemas/MeetingAppCheck"}}},"required":["app","checks"]},"MeetingConnectSessionPublic":{"type":"object","properties":{"tenantName":{"type":"string"},"service":{"$ref":"#/components/schemas/MeetingService"},"accountEmail":{"type":"string"},"status":{"$ref":"#/components/schemas/ConnectSessionStatus"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["tenantName","service","accountEmail","status","expiresAt"]},"CalendarAccess":{"enum":["owner","writer","reader","freebusy"],"type":"string"},"Calendar":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"isPrimary":{"type":"boolean"},"access":{"$ref":"#/components/schemas/CalendarAccess"},"canEdit":{"type":"boolean"},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeZone":{"anyOf":[{"type":"string"},{"type":"null"}]},"isHidden":{"type":"boolean"}},"required":["id","name","description","owner","isPrimary","access","canEdit","color","timeZone","isHidden"]},"CalendarList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Calendar"}}},"required":["items"]},"CalendarChangedField":{"enum":["name","description","owner","isPrimary","access","canEdit","color","timeZone","isHidden"],"type":"string"},"EventKind":{"enum":["single","series","occurrence","exception"],"type":"string"},"AttendeeType":{"enum":["required","optional","resource"],"type":"string"},"ResponseStatus":{"enum":["none","organizer","accepted","tentative","declined","needs_action"],"type":"string"},"EventStatus":{"enum":["confirmed","tentative","cancelled"],"type":"string"},"ShowAs":{"enum":["free","busy","tentative","oof","working_elsewhere","unknown"],"type":"string"},"Sensitivity":{"enum":["normal","personal","private","confidential"],"type":"string"},"Attendee":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"type":"string"},"type":{"$ref":"#/components/schemas/AttendeeType"},"response":{"$ref":"#/components/schemas/ResponseStatus"}},"required":["name","address","type","response"]},"EventTime":{"type":"object","properties":{"dateTime":{"type":"string","format":"date-time","x-native-type":"date"},"date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"timeZone":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["dateTime","date","timeZone"]},"CalendarEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"calendarId":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/EventKind"},"seriesId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"originalStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"start":{"$ref":"#/components/schemas/EventTime"},"end":{"$ref":"#/components/schemas/EventTime"},"isAllDay":{"type":"boolean"},"organizer":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/Attendee"}},"isOrganizer":{"type":"boolean"},"selfResponse":{"$ref":"#/components/schemas/ResponseStatus"},"status":{"$ref":"#/components/schemas/EventStatus"},"showAs":{"$ref":"#/components/schemas/ShowAs"},"sensitivity":{"$ref":"#/components/schemas/Sensitivity"},"onlineMeetingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"onlineMeetingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"iCalUid":{"anyOf":[{"type":"string"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"recurrenceTimeZone":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledStarts":{"anyOf":[{"type":"array","items":{"type":"string","format":"date-time","x-native-type":"date"}},{"type":"null"}]},"categories":{"type":"array","items":{"type":"string"}},"hasAttachments":{"type":"boolean"},"reminderMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"webLink":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","calendarId","kind","seriesId","originalStart","subject","snippet","location","start","end","isAllDay","organizer","attendees","isOrganizer","selfResponse","status","showAs","sensitivity","onlineMeetingUrl","onlineMeetingProvider","iCalUid","recurrence","recurrenceTimeZone","cancelledStarts","categories","hasAttachments","reminderMinutes","webLink","updatedAt"]},"CalendarEventPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEvent"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"CalendarEventChangedField":{"enum":["kind","originalStart","subject","snippet","location","start","end","isAllDay","organizer","attendees","isOrganizer","selfResponse","status","showAs","sensitivity","onlineMeetingUrl","onlineMeetingProvider","iCalUid","recurrence","recurrenceTimeZone","cancelledStarts","categories","hasAttachments","reminderMinutes","webLink"],"type":"string"},"BodyContentType":{"enum":["text","html"],"type":"string"},"EventBody":{"type":"object","properties":{"contentType":{"$ref":"#/components/schemas/BodyContentType"},"content":{"type":"string"}},"required":["contentType","content"]},"CalendarEventDetail":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"calendarId":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/EventKind"},"seriesId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"originalStart":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"start":{"$ref":"#/components/schemas/EventTime"},"end":{"$ref":"#/components/schemas/EventTime"},"isAllDay":{"type":"boolean"},"organizer":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"attendees":{"type":"array","items":{"$ref":"#/components/schemas/Attendee"}},"isOrganizer":{"type":"boolean"},"selfResponse":{"$ref":"#/components/schemas/ResponseStatus"},"status":{"$ref":"#/components/schemas/EventStatus"},"showAs":{"$ref":"#/components/schemas/ShowAs"},"sensitivity":{"$ref":"#/components/schemas/Sensitivity"},"onlineMeetingUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"onlineMeetingProvider":{"anyOf":[{"type":"string"},{"type":"null"}]},"iCalUid":{"anyOf":[{"type":"string"},{"type":"null"}]},"recurrence":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"recurrenceTimeZone":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelledStarts":{"anyOf":[{"type":"array","items":{"type":"string","format":"date-time","x-native-type":"date"}},{"type":"null"}]},"categories":{"type":"array","items":{"type":"string"}},"hasAttachments":{"type":"boolean"},"reminderMinutes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"webLink":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"body":{"anyOf":[{"$ref":"#/components/schemas/EventBody"},{"type":"null"}]}},"required":["id","calendarId","kind","seriesId","originalStart","subject","snippet","location","start","end","isAllDay","organizer","attendees","isOrganizer","selfResponse","status","showAs","sensitivity","onlineMeetingUrl","onlineMeetingProvider","iCalUid","recurrence","recurrenceTimeZone","cancelledStarts","categories","hasAttachments","reminderMinutes","webLink","updatedAt","body"]},"EventTimeInput":{"anyOf":[{"type":"object","properties":{"dateTime":{"type":"string","format":"date-time"},"timeZone":{"type":"string","minLength":1,"maxLength":64}},"required":["dateTime","timeZone"]},{"type":"object","properties":{"date":{"type":"string","format":"date"}},"required":["date"]}]},"AttendeeInput":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"address":{"type":"string","maxLength":320,"format":"email"},"type":{"$ref":"#/components/schemas/AttendeeType","default":"required"}},"required":["address"]},"RsvpResponse":{"enum":["accepted","tentative","declined"],"type":"string"},"BusyStatus":{"enum":["busy","tentative","oof","working_elsewhere","unknown"],"type":"string"},"BusyBlock":{"type":"object","properties":{"start":{"type":"string","format":"date-time","x-native-type":"date"},"end":{"type":"string","format":"date-time","x-native-type":"date"},"status":{"$ref":"#/components/schemas/BusyStatus"}},"required":["start","end","status"]},"AttendeeAvailability":{"type":"object","properties":{"address":{"type":"string"},"busy":{"type":"array","items":{"$ref":"#/components/schemas/BusyBlock"}},"error":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["address","busy","error"]},"Weekday":{"enum":["mon","tue","wed","thu","fri","sat","sun"],"type":"string"},"WorkingHours":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"days":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Weekday"},"default":["mon","tue","wed","thu","fri"]}},"required":["start","end"]},"TimeSlot":{"type":"object","properties":{"start":{"type":"string","format":"date-time","x-native-type":"date"},"end":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["start","end"]},"Availability":{"type":"object","properties":{"attendees":{"type":"array","items":{"$ref":"#/components/schemas/AttendeeAvailability"}},"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/TimeSlot"}}},"required":["attendees","suggestions"]},"ContactEmailType":{"enum":["home","work","other"],"type":"string"},"ContactPhoneType":{"enum":["mobile","home","work","other"],"type":"string"},"ContactEmail":{"type":"object","properties":{"address":{"type":"string"},"type":{"anyOf":[{"$ref":"#/components/schemas/ContactEmailType"},{"type":"null"}]}},"required":["address","type"]},"ContactPhone":{"type":"object","properties":{"number":{"type":"string"},"type":{"anyOf":[{"$ref":"#/components/schemas/ContactPhoneType"},{"type":"null"}]}},"required":["number","type"]},"ContactFolder":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"isDefault":{"type":"boolean"}},"required":["id","name","isDefault"]},"ContactFolderList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ContactFolder"}}},"required":["items"]},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"folderId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string"},{"type":"null"}]},"middleName":{"anyOf":[{"type":"string"},{"type":"null"}]},"familyName":{"anyOf":[{"type":"string"},{"type":"null"}]},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}]},"emails":{"type":"array","items":{"$ref":"#/components/schemas/ContactEmail"}},"phones":{"type":"array","items":{"$ref":"#/components/schemas/ContactPhone"}},"organization":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string"},{"type":"null"}]},"department":{"anyOf":[{"type":"string"},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasPhoto":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","folderId","displayName","givenName","middleName","familyName","nickname","emails","phones","organization","jobTitle","department","birthday","notes","hasPhoto","updatedAt"]},"ContactPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"ContactChangedField":{"enum":["folderId","displayName","givenName","middleName","familyName","nickname","emails","phones","organization","jobTitle","department","birthday","notes","hasPhoto","photo"],"type":"string"},"ContactEmailInput":{"type":"object","properties":{"address":{"type":"string","maxLength":320,"format":"email"},"type":{"$ref":"#/components/schemas/ContactEmailType"}},"required":["address"]},"ContactPhoneInput":{"type":"object","properties":{"number":{"type":"string","minLength":1,"maxLength":64},"type":{"$ref":"#/components/schemas/ContactPhoneType"}},"required":["number"]},"SuppressionSource":{"enum":["unsubscribe","bounce","api","reply","complaint","inactive"],"type":"string"},"DetectedOptOutSource":{"enum":["reply","complaint","inactive"],"type":"string"},"SuppressionEntry":{"type":"object","properties":{"address":{"type":"string"},"source":{"$ref":"#/components/schemas/SuppressionSource"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["address","source","reason","createdAt"]},"SuppressionEntryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionEntry"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"SuppressionCounts":{"type":"object","properties":{"unsubscribe":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bounce":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"api":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"reply":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"complaint":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"inactive":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["unsubscribe","bounce","api","reply","complaint","inactive"]},"SuppressionList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"counts":{"$ref":"#/components/schemas/SuppressionCounts"},"createdAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","name","description","count","counts","createdAt"]},"SuppressionListList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionList"}}},"required":["items"]},"SuppressionReview":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"listId":{"type":"string"},"address":{"type":"string"},"source":{"$ref":"#/components/schemas/DetectedOptOutSource"},"accountId":{"type":"string","format":"uuid"},"messageId":{"type":"string","format":"uuid"},"probability":{"type":"number"},"alternateContacts":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","listId","address","source","accountId","messageId","probability","alternateContacts","createdAt"]},"SuppressionReviewPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionReview"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"CreateSuppressionList":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["id","name"]},"SuppressionAdded":{"type":"object","properties":{"added":{"type":"boolean"}},"required":["added"]},"SuppressionEntriesAdded":{"type":"object","properties":{"added":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"alreadyListed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["added","alreadyListed"]},"AttachmentInput":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":255},"content":{"type":"string","contentEncoding":"base64"},"contentId":{"type":"string","maxLength":255}},"required":["filename","contentType","content"]},"OutboxStatus":{"enum":["queued","sending","sent","failed","cancelled"],"type":"string"},"OutboxEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/OutboxStatus"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendAt":{"type":"string","format":"date-time","x-native-type":"date"},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerMessageId":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"internetMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"trackOpens":{"type":"boolean"},"trackClicks":{"type":"boolean"},"trackHoneypot":{"type":"boolean"},"humanOpenCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"machineOpenCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"humanClickCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"machineClickCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstOpenedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastOpenedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","accountId","status","reference","sendAt","attempt","lastError","providerMessageId","internetMessageId","sentAt","createdAt","trackOpens","trackClicks","trackHoneypot","humanOpenCount","machineOpenCount","humanClickCount","machineClickCount","firstOpenedAt","lastOpenedAt"]},"QueuedSend":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/OutboxStatus"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendAt":{"type":"string","format":"date-time","x-native-type":"date"},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"providerMessageId":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"internetMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"trackOpens":{"type":"boolean"},"trackClicks":{"type":"boolean"},"trackHoneypot":{"type":"boolean"},"humanOpenCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"machineOpenCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"humanClickCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"machineClickCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"firstOpenedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastOpenedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"undoUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","accountId","status","reference","sendAt","attempt","lastError","providerMessageId","internetMessageId","sentAt","createdAt","trackOpens","trackClicks","trackHoneypot","humanOpenCount","machineOpenCount","humanClickCount","machineClickCount","firstOpenedAt","lastOpenedAt","undoUntil"]},"SendTracking":{"type":"object","properties":{"opens":{"type":"boolean"},"clicks":{"type":"boolean"},"honeypot":{"type":"boolean"}}},"MailMergeEntry":{"type":"object","properties":{"to":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"address":{"type":"string","maxLength":320}},"required":["address"]},"params":{"$ref":"#/components/schemas/RenderParams"},"messageId":{"type":"string","maxLength":998},"sendAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["to"]},"MailMergeSuccess":{"type":"object","properties":{"success":{"const":true},"to":{"$ref":"#/components/schemas/Address"},"outboxId":{"type":"string","format":"uuid"},"messageId":{"type":"string"},"sendAt":{"type":"string","format":"date-time","x-native-type":"date"},"undoUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["success","to","outboxId","messageId","sendAt","undoUntil"]},"MailMergeFailure":{"type":"object","properties":{"success":{"const":false},"to":{"$ref":"#/components/schemas/Address"},"reason":{"type":"string"},"error":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["success","to","reason","error","status"]},"MailMergeResult":{"anyOf":[{"$ref":"#/components/schemas/MailMergeSuccess"},{"$ref":"#/components/schemas/MailMergeFailure"}]},"MailMergeResultList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MailMergeResult"}}},"required":["items"]},"OutboxEntryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OutboxEntry"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"TrackingEventKind":{"enum":["open","click"],"type":"string"},"TrackingActor":{"enum":["human","proxy","prefetch","scanner","unknown"],"type":"string"},"TrackingClient":{"enum":["gmail_proxy","gmail_web","gmail_app","outlook_web","outlook_desktop","outlook_mobile","apple_mail","apple_mail_privacy","yahoo","aol","thunderbird","proton","fastmail","zoho","icloud_web","webmail","unknown"],"type":"string"},"TrackingDevice":{"enum":["desktop","mobile","tablet","bot","unknown"],"type":"string"},"TrackingOs":{"enum":["windows","macos","ios","ipados","android","linux","chromeos"],"type":"string"},"TrackingBrowser":{"enum":["chrome","edge","firefox","safari","opera","samsung"],"type":"string"},"TrackingSecFetch":{"type":"object","properties":{"dest":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"anyOf":[{"type":"string"},{"type":"null"}]},"site":{"anyOf":[{"type":"string"},{"type":"null"}]},"user":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["dest","mode","site","user"]},"TrackingEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/TrackingEventKind"},"linkIndex":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurredAt":{"type":"string","format":"date-time","x-native-type":"date"},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"ip":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"$ref":"#/components/schemas/TrackingActor"},"reasons":{"type":"array","items":{"type":"string"}},"isMachine":{"type":"boolean"},"method":{"type":"string"},"refererHost":{"anyOf":[{"type":"string"},{"type":"null"}]},"originHost":{"anyOf":[{"type":"string"},{"type":"null"}]},"client":{"$ref":"#/components/schemas/TrackingClient"},"device":{"$ref":"#/components/schemas/TrackingDevice"},"os":{"anyOf":[{"$ref":"#/components/schemas/TrackingOs"},{"type":"null"}]},"browser":{"anyOf":[{"$ref":"#/components/schemas/TrackingBrowser"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"secondsAfterSend":{"anyOf":[{"type":"number"},{"type":"null"}]},"secondsSincePrevious":{"anyOf":[{"type":"number"},{"type":"null"}]},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isConditional":{"type":"boolean"},"isRange":{"type":"boolean"},"isPrefetch":{"type":"boolean"},"secFetch":{"$ref":"#/components/schemas/TrackingSecFetch"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["id","kind","linkIndex","url","occurredAt","userAgent","ip","actor","reasons","isMachine","method","refererHost","originHost","client","device","os","browser","country","region","city","timezone","latitude","longitude","secondsAfterSend","secondsSincePrevious","sequence","isConditional","isRange","isPrefetch","secFetch","headers"]},"TrackingEventPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TrackingEvent"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"AccountConnectedData":{"type":"object","properties":{"email":{"type":"string"},"provider":{"$ref":"#/components/schemas/AccountProvider"},"cloud":{"anyOf":[{"$ref":"#/components/schemas/MicrosoftCloud"},{"type":"null"}]},"externalRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"reauthorized":{"type":"boolean"}},"required":["email","provider","cloud","externalRef","reauthorized"]},"AccountUpdatedField":{"enum":["status","externalRef","settings","imap","dav","credentials"],"type":"string"},"AccountUpdatedData":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/AccountUpdatedField"}}},"required":["fields"]},"AccountDeletedData":{"type":"object","properties":{"email":{"type":"string"},"externalRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"purge":{"type":"boolean"}},"required":["email","externalRef","purge"]},"AccountReauthRequiredData":{"type":"object","properties":{"email":{"type":"string"},"provider":{"$ref":"#/components/schemas/AccountProvider"},"cloud":{"anyOf":[{"$ref":"#/components/schemas/MicrosoftCloud"},{"type":"null"}]},"externalRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string"}},"required":["email","provider","cloud","externalRef","reason"]},"AccountInitializedData":{"type":"object","properties":{"mailboxes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"messages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["mailboxes","messages"]},"AccountPurgedData":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"externalRef":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["accountId","externalRef"]},"MailboxData":{"type":"object","properties":{"mailbox":{"$ref":"#/components/schemas/Mailbox"}},"required":["mailbox"]},"MailboxUpdatedData":{"type":"object","properties":{"mailbox":{"$ref":"#/components/schemas/Mailbox"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/MailboxChangedField"}}},"required":["mailbox","changes"]},"MailboxRef":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/MailboxRole"}},"required":["id","name","role"]},"MessageData":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/MessageSummary"},"mailboxes":{"type":"array","items":{"$ref":"#/components/schemas/MailboxRef"}}},"required":["message","mailboxes"]},"MessageUpdatedData":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/MessageSummary"},"mailboxes":{"type":"array","items":{"$ref":"#/components/schemas/MailboxRef"}},"changes":{"type":"array","items":{"$ref":"#/components/schemas/MessageChangedField"}}},"required":["message","mailboxes","changes"]},"MessageDeletedData":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/MessageSummary"},"mailboxes":{"type":"array","items":{"$ref":"#/components/schemas/MailboxRef"}},"messageId":{"type":"string","format":"uuid"},"providerMessageId":{"type":"string","minLength":1,"maxLength":1024}},"required":["message","mailboxes","messageId","providerMessageId"]},"MessageClassifiedData":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/MessageSummary"},"mailboxes":{"type":"array","items":{"$ref":"#/components/schemas/MailboxRef"}},"classification":{"$ref":"#/components/schemas/MessageClassification"}},"required":["message","mailboxes","classification"]},"BounceRecipient":{"type":"object","properties":{"address":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostic":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["address","status","diagnostic"]},"MessageBouncedData":{"type":"object","properties":{"messageId":{"type":"string","format":"uuid"},"outboxId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"originalMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/BounceRecipient"}}},"required":["messageId","outboxId","reference","originalMessageId","recipients"]},"TrackingHitData":{"type":"object","properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurredAt":{"type":"string","format":"date-time","x-native-type":"date"},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"$ref":"#/components/schemas/TrackingActor"},"reasons":{"type":"array","items":{"type":"string"}},"isMachine":{"type":"boolean"},"method":{"type":"string"},"refererHost":{"anyOf":[{"type":"string"},{"type":"null"}]},"originHost":{"anyOf":[{"type":"string"},{"type":"null"}]},"client":{"$ref":"#/components/schemas/TrackingClient"},"device":{"$ref":"#/components/schemas/TrackingDevice"},"os":{"anyOf":[{"$ref":"#/components/schemas/TrackingOs"},{"type":"null"}]},"browser":{"anyOf":[{"$ref":"#/components/schemas/TrackingBrowser"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"secondsAfterSend":{"anyOf":[{"type":"number"},{"type":"null"}]},"secondsSincePrevious":{"anyOf":[{"type":"number"},{"type":"null"}]},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isConditional":{"type":"boolean"},"isRange":{"type":"boolean"},"isPrefetch":{"type":"boolean"},"secFetch":{"$ref":"#/components/schemas/TrackingSecFetch"},"outboxId":{"type":"string","format":"uuid"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"messageId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["url","occurredAt","userAgent","actor","reasons","isMachine","method","refererHost","originHost","client","device","os","browser","country","region","city","timezone","latitude","longitude","secondsAfterSend","secondsSincePrevious","sequence","isConditional","isRange","isPrefetch","secFetch","outboxId","reference","messageId"]},"SendError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"SendSentData":{"type":"object","properties":{"outboxId":{"type":"string","format":"uuid"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerMessageId":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"internetMessageId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sentAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["outboxId","reference","attempt","providerMessageId","internetMessageId","sentAt"]},"SendRetryingData":{"type":"object","properties":{"outboxId":{"type":"string","format":"uuid"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextAttemptAt":{"type":"string","format":"date-time","x-native-type":"date"},"error":{"$ref":"#/components/schemas/SendError"}},"required":["outboxId","reference","attempt","nextAttemptAt","error"]},"SendFailedData":{"type":"object","properties":{"outboxId":{"type":"string","format":"uuid"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"$ref":"#/components/schemas/SendError"}},"required":["outboxId","reference","attempt","error"]},"SendRescheduledData":{"type":"object","properties":{"outboxId":{"type":"string","format":"uuid"},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"sendAt":{"type":"string","format":"date-time","x-native-type":"date"},"previousSendAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["outboxId","reference","sendAt","previousSendAt"]},"SuppressionCreatedData":{"type":"object","properties":{"listId":{"type":"string"},"address":{"type":"string"},"source":{"$ref":"#/components/schemas/SuppressionSource"}},"required":["listId","address","source"]},"CalendarInitializedData":{"type":"object","properties":{"calendars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["calendars","events"]},"CalendarData":{"type":"object","properties":{"calendar":{"$ref":"#/components/schemas/Calendar"}},"required":["calendar"]},"CalendarUpdatedData":{"type":"object","properties":{"calendar":{"$ref":"#/components/schemas/Calendar"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/CalendarChangedField"}}},"required":["calendar","changes"]},"CalendarEventData":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/CalendarEvent"}},"required":["event"]},"CalendarEventUpdatedData":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/CalendarEvent"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/CalendarEventChangedField"}}},"required":["event","changes"]},"CalendarEventDeletedData":{"type":"object","properties":{"eventId":{"type":"string","format":"uuid"},"calendarId":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/EventKind"},"seriesId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["eventId","calendarId","kind","seriesId"]},"ContactsInitializedData":{"type":"object","properties":{"contacts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["contacts"]},"ContactData":{"type":"object","properties":{"contact":{"$ref":"#/components/schemas/Contact"}},"required":["contact"]},"ContactUpdatedData":{"type":"object","properties":{"contact":{"$ref":"#/components/schemas/Contact"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/ContactChangedField"}}},"required":["contact","changes"]},"ContactDeletedData":{"type":"object","properties":{"contactId":{"type":"string","format":"uuid"},"folderId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["contactId","folderId"]},"WebhookTestData":{"type":"object","properties":{"endpointId":{"type":"string","format":"uuid"}},"required":["endpointId"]},"ExportCompletedData":{"type":"object","properties":{"exportId":{"type":"string","format":"uuid"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["exportId","bytes","sha256","expiresAt"]},"ExportFailedData":{"type":"object","properties":{"exportId":{"type":"string","format":"uuid"},"error":{"type":"string"}},"required":["exportId","error"]},"MeetingConnectionConnectedData":{"type":"object","properties":{"service":{"$ref":"#/components/schemas/MeetingService"},"email":{"type":"string"},"reconnected":{"type":"boolean"}},"required":["service","email","reconnected"]},"MeetingConnectionReauthRequiredData":{"type":"object","properties":{"service":{"$ref":"#/components/schemas/MeetingService"},"email":{"type":"string"},"reason":{"type":"string"}},"required":["service","email","reason"]},"EventType":{"enum":["account.connected","account.updated","account.deleted","account.reauth_required","account.initialized","account.purged","mailbox.created","mailbox.updated","mailbox.deleted","message.created","message.updated","message.deleted","message.bounced","message.classified","message.opened","message.clicked","send.sent","send.retrying","send.failed","send.rescheduled","suppression.created","calendar.initialized","calendar.created","calendar.updated","calendar.deleted","calendar_event.created","calendar_event.updated","calendar_event.deleted","contacts.initialized","contact.created","contact.updated","contact.deleted","export.completed","export.failed","meeting_connection.connected","meeting_connection.reauth_required","webhook.test"],"type":"string"},"AccountConnectedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"account.connected"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/AccountConnectedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"An account was connected, or an existing account signed in again (reauthorized)."},"AccountUpdatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"account.updated"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/AccountUpdatedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"An account's status, externalRef, settings or connection changed."},"AccountDeletedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"account.deleted"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/AccountDeletedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"An account was deleted; its data is purged after the retention period, or at once with purge."},"AccountReauthRequiredEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"account.reauth_required"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/AccountReauthRequiredData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"The provider refused the account's grant: the account must sign in again."},"AccountInitializedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"account.initialized"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/AccountInitializedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"The account's first mail sync finished; nothing before it is announced message by message."},"AccountPurgedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"account.purged"},"accountId":{"type":"null"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/AccountPurgedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A deleted account's data is gone for good (retention, or an immediate purge). The event names no account, since it outlives the account it reports on."},"MailboxCreatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"mailbox.created"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MailboxData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A mailbox (folder or label) appeared."},"MailboxUpdatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"mailbox.updated"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MailboxUpdatedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A mailbox was renamed, moved or given another role. Counts change silently."},"MailboxDeletedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"mailbox.deleted"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MailboxData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A mailbox went away."},"MessageCreatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"message.created"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MessageData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A message was indexed: received, sent, drafted or moved in from outside the sync window."},"MessageUpdatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"message.updated"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MessageUpdatedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A message changed: read, flagged, moved, or linked to the outbox entry it is a copy of."},"MessageDeletedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"message.deleted"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MessageDeletedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A message was removed; carries it and its mailboxes as last indexed."},"MessageBouncedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"message.bounced"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MessageBouncedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A delivery status notification reporting failed recipients reached the account; carries the outbox id when it answers one of our sends."},"MessageClassifiedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"message.classified"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MessageClassifiedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"AI classified a reply to one of our sends (tenant setting aiReplyClassification): carries the message, its mailboxes and the classification."},"MessageOpenedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"message.opened"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/TrackingHitData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A recipient's client (or a proxy fetching for it) loaded the open-tracking pixel of a send. Carries the actor, its reasons and the derived signals (client, device, location, referer host, sec-fetch tuple, timing); the raw headers are only on the tracking list."},"MessageClickedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"message.clicked"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/TrackingHitData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A tracked link of a send was followed; carries the same as message.opened."},"SendSentEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"send.sent"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/SendSentData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"The provider accepted a queued send."},"SendRetryingEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"send.retrying"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/SendRetryingData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"An attempt failed and the send is queued again for nextAttemptAt."},"SendFailedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"send.failed"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/SendFailedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"The send failed for good: refused, or out of attempts."},"SendRescheduledEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"send.rescheduled"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/SendRescheduledData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A queued send got a new sendAt before its first attempt."},"SuppressionCreatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"suppression.created"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/SuppressionCreatedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"An address went onto a suppression list: the recipient unsubscribed (source unsubscribe, listId the send's), a permanent bounce said the address is gone (source bounce, listId global), or a detected opt-out was suppressed, at once or on approval (source reply or complaint, listId the send's or global; source inactive, on approval only, listId global). Only a change is announced; API adds are audited instead. The account is the one whose send it concerns."},"CalendarInitializedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"calendar.initialized"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/CalendarInitializedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"The account's first calendar sync finished; nothing before it is announced event by event."},"CalendarCreatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"calendar.created"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/CalendarData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A calendar appeared."},"CalendarUpdatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"calendar.updated"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/CalendarUpdatedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A calendar changed."},"CalendarDeletedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"calendar.deleted"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/CalendarData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A calendar went away."},"CalendarEventCreatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"calendar_event.created"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/CalendarEventData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A single event, series or exception appeared. Unmodified occurrences of a series are never announced; an occurrence changed on its own is announced as a new exception."},"CalendarEventUpdatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"calendar_event.updated"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/CalendarEventUpdatedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A single event, series or exception changed; a change to a series is one update of the series."},"CalendarEventDeletedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"calendar_event.deleted"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/CalendarEventDeletedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A single event, series or exception went away."},"ContactsInitializedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"contacts.initialized"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/ContactsInitializedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"The account's first contacts sync finished; nothing before it is announced contact by contact."},"ContactCreatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"contact.created"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/ContactData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A contact appeared."},"ContactUpdatedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"contact.updated"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/ContactUpdatedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A contact changed."},"ContactDeletedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"contact.deleted"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/ContactDeletedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A contact went away."},"ExportCompletedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"export.completed"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/ExportCompletedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A data export finished and can be downloaded until data.expiresAt. accountId is null for an export of the whole tenant."},"ExportFailedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"export.failed"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/ExportFailedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"A data export failed. accountId is null for an export of the whole tenant."},"MeetingConnectionConnectedEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"meeting_connection.connected"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MeetingConnectionConnectedData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"An account connected (or reconnected) its own grant at a meeting service (Zoom, Webex)."},"MeetingConnectionReauthRequiredEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"meeting_connection.reauth_required"},"accountId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/MeetingConnectionReauthRequiredData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"The service refused the account's meeting grant; meetings need a new connect. Mail and calendar sync go on."},"WebhookTestEvent":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/EventId"},"type":{"const":"webhook.test"},"accountId":{"type":"null"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"data":{"$ref":"#/components/schemas/WebhookTestData"},"isTest":{"const":true}},"required":["id","type","accountId","createdAt","data"],"description":"Sent by the test action to the endpoint it names, whatever that endpoint's filters."},"Event":{"anyOf":[{"$ref":"#/components/schemas/AccountConnectedEvent"},{"$ref":"#/components/schemas/AccountUpdatedEvent"},{"$ref":"#/components/schemas/AccountDeletedEvent"},{"$ref":"#/components/schemas/AccountReauthRequiredEvent"},{"$ref":"#/components/schemas/AccountInitializedEvent"},{"$ref":"#/components/schemas/AccountPurgedEvent"},{"$ref":"#/components/schemas/MailboxCreatedEvent"},{"$ref":"#/components/schemas/MailboxUpdatedEvent"},{"$ref":"#/components/schemas/MailboxDeletedEvent"},{"$ref":"#/components/schemas/MessageCreatedEvent"},{"$ref":"#/components/schemas/MessageUpdatedEvent"},{"$ref":"#/components/schemas/MessageDeletedEvent"},{"$ref":"#/components/schemas/MessageBouncedEvent"},{"$ref":"#/components/schemas/MessageClassifiedEvent"},{"$ref":"#/components/schemas/MessageOpenedEvent"},{"$ref":"#/components/schemas/MessageClickedEvent"},{"$ref":"#/components/schemas/SendSentEvent"},{"$ref":"#/components/schemas/SendRetryingEvent"},{"$ref":"#/components/schemas/SendFailedEvent"},{"$ref":"#/components/schemas/SendRescheduledEvent"},{"$ref":"#/components/schemas/SuppressionCreatedEvent"},{"$ref":"#/components/schemas/CalendarInitializedEvent"},{"$ref":"#/components/schemas/CalendarCreatedEvent"},{"$ref":"#/components/schemas/CalendarUpdatedEvent"},{"$ref":"#/components/schemas/CalendarDeletedEvent"},{"$ref":"#/components/schemas/CalendarEventCreatedEvent"},{"$ref":"#/components/schemas/CalendarEventUpdatedEvent"},{"$ref":"#/components/schemas/CalendarEventDeletedEvent"},{"$ref":"#/components/schemas/ContactsInitializedEvent"},{"$ref":"#/components/schemas/ContactCreatedEvent"},{"$ref":"#/components/schemas/ContactUpdatedEvent"},{"$ref":"#/components/schemas/ContactDeletedEvent"},{"$ref":"#/components/schemas/ExportCompletedEvent"},{"$ref":"#/components/schemas/ExportFailedEvent"},{"$ref":"#/components/schemas/MeetingConnectionConnectedEvent"},{"$ref":"#/components/schemas/MeetingConnectionReauthRequiredEvent"},{"$ref":"#/components/schemas/WebhookTestEvent"}]},"EventFeedPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"nextCursor":{"type":"string","minLength":1,"maxLength":512}},"required":["items","nextCursor"]},"WebhookMessageFilters":{"type":"object","properties":{"mailboxIds":{"type":"array","items":{"type":"string","format":"uuid"}},"mailboxRoles":{"type":"array","items":{"$ref":"#/components/schemas/MailboxRole"}},"from":{"type":"array","items":{"type":"string"}},"to":{"type":"array","items":{"type":"string"}},"subjectContains":{"type":"array","items":{"type":"string"}},"hasAttachments":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"direction":{"anyOf":[{"$ref":"#/components/schemas/MessageDirection"},{"type":"null"}]}},"required":["mailboxIds","mailboxRoles","from","to","subjectContains","hasAttachments","direction"]},"WebhookFilters":{"type":"object","properties":{"eventTypes":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}},"accountIds":{"type":"array","items":{"type":"string","format":"uuid"}},"message":{"$ref":"#/components/schemas/WebhookMessageFilters"}},"required":["eventTypes","accountIds","message"]},"WebhookMessageFiltersInput":{"type":"object","properties":{"mailboxIds":{"type":"array","maxItems":100,"items":{"type":"string","format":"uuid"}},"mailboxRoles":{"type":"array","maxItems":9,"items":{"$ref":"#/components/schemas/MailboxRole"}},"from":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":320,"pattern":"^(?:[^\\s@]+)?@[^\\s@.]+(?:\\.[^\\s@.]+)+$"}},"to":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":320,"pattern":"^(?:[^\\s@]+)?@[^\\s@.]+(?:\\.[^\\s@.]+)+$"}},"subjectContains":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"maxLength":200}},"hasAttachments":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"direction":{"anyOf":[{"$ref":"#/components/schemas/MessageDirection"},{"type":"null"}]}}},"WebhookFiltersInput":{"type":"object","properties":{"eventTypes":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/EventType"}},"accountIds":{"type":"array","maxItems":100,"items":{"type":"string","format":"uuid"}},"message":{"$ref":"#/components/schemas/WebhookMessageFiltersInput"}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"filters":{"$ref":"#/components/schemas/WebhookFilters"},"isEnabled":{"type":"boolean"},"disabledReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastSuccessAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"failingSince":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","url","description","filters","isEnabled","disabledReason","lastSuccessAt","failingSince","previousSecretExpiresAt","createdAt"]},"WebhookEndpointList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["items"]},"WebhookEndpointWithSecret":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"type":"string"}},"required":["endpoint","secret"]},"WebhookSecret":{"type":"object","properties":{"secret":{"type":"string"},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["secret","previousSecretExpiresAt"]},"CreateWebhookEndpoint":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"description":{"type":"string","maxLength":500},"filters":{"$ref":"#/components/schemas/WebhookFiltersInput"}},"required":["url"]},"TestEventSent":{"type":"object","properties":{"eventId":{"$ref":"#/components/schemas/EventId"}},"required":["eventId"]},"WebhookAttemptResult":{"enum":["succeeded","failed"],"type":"string"},"WebhookAttempt":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"eventId":{"$ref":"#/components/schemas/EventId"},"eventType":{"$ref":"#/components/schemas/EventType"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"statusCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"responseExcerpt":{"anyOf":[{"type":"string"},{"type":"null"}]},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isReplay":{"type":"boolean"},"isTest":{"type":"boolean"},"occurredAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","eventId","eventType","accountId","attempt","statusCode","error","responseExcerpt","durationMs","isReplay","isTest","occurredAt"]},"WebhookAttemptPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookAttempt"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"ReplayResult":{"type":"object","properties":{"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"alreadyQueued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["queued","alreadyQueued"]},"FailedDeliveryCount":{"type":"object","properties":{"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["count"]},"AiDraftFormat":{"enum":["text","markdown"],"type":"string"},"AiDraftContext":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"},"replyToMessageId":{"type":"string","format":"uuid"},"currentDraft":{"type":"string","maxLength":20000}}},"CreateAiDraft":{"type":"object","properties":{"instructions":{"type":"string","minLength":1,"maxLength":2000},"context":{"$ref":"#/components/schemas/AiDraftContext"},"format":{"$ref":"#/components/schemas/AiDraftFormat"}},"required":["instructions","format"]},"AiDraft":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]},"AuditActorType":{"enum":["user","apiKey","accountToken","connectSession"],"type":"string"},"AuditActor":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/AuditActorType"},"id":{"type":"string","format":"uuid"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","id","label"]},"AuditSurface":{"enum":["v1","rpc","mcp"],"type":"string"},"AuditOutcome":{"enum":["success","failure"],"type":"string"},"AuditEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"actor":{"$ref":"#/components/schemas/AuditActor"},"action":{"type":"string"},"surface":{"$ref":"#/components/schemas/AuditSurface"},"targets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"ip":{"anyOf":[{"type":"string"},{"type":"null"}]},"userAgent":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","createdAt","actor","action","surface","targets","ip","userAgent","status","errorReason","requestId"]},"AuditEntryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"ExportStatus":{"enum":["queued","running","completed","failed","expired"],"type":"string"},"DataExport":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"accountEmail":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ExportStatus"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}]},"contents":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"startedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","accountId","accountEmail","status","bytes","sha256","contents","error","createdAt","startedAt","completedAt","expiresAt"]},"DataExportPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DataExport"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"CreateDataExport":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid"}}},"IdentitySource":{"enum":["primary","provider","custom"],"type":"string"},"Signature":{"type":"object","properties":{"html":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["html","text"]},"SignatureInput":{"type":"object","properties":{"html":{"type":"string","maxLength":100000},"text":{"type":"string","maxLength":20000}}},"Identity":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"type":"string"},"id":{"type":"string","format":"uuid"},"source":{"$ref":"#/components/schemas/IdentitySource"},"signature":{"anyOf":[{"$ref":"#/components/schemas/Signature"},{"type":"null"}]},"providerSignature":{"anyOf":[{"$ref":"#/components/schemas/Signature"},{"type":"null"}]}},"required":["name","address","id","source","signature","providerSignature"]},"IdentityList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Identity"}},"refreshedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["items","refreshedAt"]},"MailSettings":{"type":"object","properties":{"signByDefault":{"type":"boolean"}},"required":["signByDefault"]},"GmailPushSettings":{"type":"object","properties":{"topic":{"type":"string","pattern":"^projects\\/[a-z][a-z0-9.:-]{4,61}[a-z0-9]\\/topics\\/(?!goog)[A-Za-z][A-Za-z0-9._~+%-]{2,254}$"},"serviceAccount":{"type":"string","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","allOf":[{"pattern":"\\.gserviceaccount\\.com$"}]}},"required":["topic","serviceAccount"]},"OAuthApp":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"$ref":"#/components/schemas/OAuthProvider"},"name":{"type":"string"},"clientId":{"type":"string"},"cloud":{"anyOf":[{"$ref":"#/components/schemas/MicrosoftCloud"},{"type":"null"}]},"authority":{"anyOf":[{"type":"string"},{"type":"null"}]},"gmailPush":{"anyOf":[{"$ref":"#/components/schemas/GmailPushSettings"},{"type":"null"}]},"gmailPushEndpoint":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","provider","name","clientId","cloud","authority","gmailPush","gmailPushEndpoint","createdAt"]},"OAuthAppList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OAuthApp"}}},"required":["items"]},"CreateOAuthApp":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/OAuthProvider"},"cloud":{"$ref":"#/components/schemas/MicrosoftCloud"},"name":{"type":"string","minLength":1,"maxLength":100},"clientId":{"type":"string","minLength":1},"clientSecret":{"type":"string","minLength":1},"authority":{"type":"string"}},"required":["provider","name","clientId","clientSecret"]},"OrgConnectionKind":{"enum":["google_delegation","microsoft_app"],"type":"string"},"OrgConnectionStatus":{"enum":["pending_consent","unverified","active","failing"],"type":"string"},"MicrosoftAppCredential":{"enum":["platform","client_secret","certificate"],"type":"string"},"GoogleDelegation":{"type":"object","properties":{"domain":{"type":"string"},"serviceAccountEmail":{"type":"string"},"directoryAdmin":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}}},"required":["domain","serviceAccountEmail","directoryAdmin","scopes"]},"GraphPermission":{"type":"object","properties":{"name":{"type":"string"},"isRequired":{"type":"boolean"}},"required":["name","isRequired"]},"MicrosoftAppAccess":{"type":"object","properties":{"cloud":{"$ref":"#/components/schemas/MicrosoftCloud"},"credentialType":{"$ref":"#/components/schemas/MicrosoftAppCredential"},"directoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/GraphPermission"}}},"required":["cloud","credentialType","directoryId","permissions"]},"OrgConnection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/OrgConnectionKind"},"name":{"type":"string"},"clientId":{"type":"string"},"status":{"$ref":"#/components/schemas/OrgConnectionStatus"},"statusDetail":{"anyOf":[{"type":"string"},{"type":"null"}]},"checkedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"google":{"anyOf":[{"$ref":"#/components/schemas/GoogleDelegation"},{"type":"null"}]},"microsoft":{"anyOf":[{"$ref":"#/components/schemas/MicrosoftAppAccess"},{"type":"null"}]},"accounts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","name","clientId","status","statusDetail","checkedAt","google","microsoft","accounts","createdAt","updatedAt"]},"OrgConnectionList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrgConnection"}}},"required":["items"]},"CreateOrgConnection":{"anyOf":[{"type":"object","properties":{"kind":{"const":"google_delegation"},"name":{"type":"string","minLength":1,"maxLength":100},"serviceAccountKey":{"type":"string","minLength":2,"maxLength":20000},"domain":{"type":"string","minLength":3,"maxLength":253},"calendarEnabled":{"type":"boolean","default":true},"contactsEnabled":{"type":"boolean","default":false},"directoryAdmin":{"type":"string","maxLength":320,"format":"email"}},"required":["kind","name","serviceAccountKey","domain"]},{"type":"object","properties":{"kind":{"const":"microsoft_app"},"name":{"type":"string","minLength":1,"maxLength":100},"cloud":{"$ref":"#/components/schemas/MicrosoftCloud","default":"global"},"credential":{"anyOf":[{"type":"object","properties":{"type":{"const":"platform"}},"required":["type"]},{"type":"object","properties":{"type":{"const":"client_secret"},"clientId":{"type":"string","minLength":1,"maxLength":100},"clientSecret":{"type":"string","minLength":1,"maxLength":1024}},"required":["type","clientId","clientSecret"]},{"type":"object","properties":{"type":{"const":"certificate"},"clientId":{"type":"string","minLength":1,"maxLength":100},"certificate":{"type":"string","minLength":1,"maxLength":20000},"privateKey":{"type":"string","minLength":1,"maxLength":20000}},"required":["type","clientId","certificate","privateKey"]}]},"directoryId":{"type":"string","minLength":1,"maxLength":100}},"required":["kind","name","credential"]}]},"OrgConnectionCheck":{"type":"object","properties":{"name":{"type":"string"},"isOk":{"type":"boolean"},"isRequired":{"type":"boolean"},"detail":{"type":"string"}},"required":["name","isOk","isRequired","detail"]},"OrgConnectionTestResult":{"type":"object","properties":{"connection":{"$ref":"#/components/schemas/OrgConnection"},"checks":{"type":"array","items":{"$ref":"#/components/schemas/OrgConnectionCheck"}}},"required":["connection","checks"]},"DirectoryEntry":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":1024},"email":{"type":"string"},"displayName":{"anyOf":[{"type":"string"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","email","displayName","accountId"]},"DirectoryEntryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryEntry"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]},"AddMailboxInput":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"displayName":{"type":"string","maxLength":255},"externalRef":{"type":"string","maxLength":255}},"required":["email"]},"AddedMailboxStatus":{"enum":["created","exists","failed"],"type":"string"},"AddedMailboxError":{"type":"object","properties":{"reason":{"type":"string"},"message":{"type":"string"}},"required":["reason","message"]},"AddedMailbox":{"type":"object","properties":{"email":{"type":"string"},"status":{"$ref":"#/components/schemas/AddedMailboxStatus"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/AddedMailboxError"},{"type":"null"}]}},"required":["email","status","accountId","error"]},"AddedMailboxList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AddedMailbox"}}},"required":["items"]},"ConsentLink":{"type":"object","properties":{"consentUrl":{"type":"string","format":"uri"}},"required":["consentUrl"]},"ThreadSummary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":1024},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"messageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isFlagged":{"type":"boolean"},"hasAttachments":{"type":"boolean"},"hasDrafts":{"type":"boolean"},"mailboxIds":{"type":"array","items":{"type":"string","format":"uuid"}},"latestMessageId":{"type":"string","format":"uuid"},"lastMessageAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","subject","snippet","participants","messageCount","unreadCount","isFlagged","hasAttachments","hasDrafts","mailboxIds","latestMessageId","lastMessageAt"]},"Thread":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":1024},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}]},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"messageCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unreadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isFlagged":{"type":"boolean"},"hasAttachments":{"type":"boolean"},"hasDrafts":{"type":"boolean"},"mailboxIds":{"type":"array","items":{"type":"string","format":"uuid"}},"latestMessageId":{"type":"string","format":"uuid"},"lastMessageAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/MessageSummary"}}},"required":["id","subject","snippet","participants","messageCount","unreadCount","isFlagged","hasAttachments","hasDrafts","mailboxIds","latestMessageId","lastMessageAt","messages"]},"ThreadSummaryPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ThreadSummary"}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]}},"required":["items","nextCursor"]}},"headers":{"X-Request-Id":{"description":"The request's id: the X-Request-Id you sent when it is 1 to 128 of A-Z a-z 0-9 . _ : -, else one the API generated.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the tightest of the plan's per-minute windows (tenant, credential) admits.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests that window still admits.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until that window ends.","schema":{"type":"integer"}},"Idempotent-Replayed":{"description":"`true` when this is the kept answer to an earlier request with the same Idempotency-Key.","schema":{"type":"string","enum":["true"]}}}},"security":[{"bearer":[]}],"openapi":"3.1.1","paths":{"/v1/accounts":{"get":{"operationId":"accounts.list","summary":"List accounts","description":"Newest first. q matches part of the email address or the external reference, case-insensitively; externalRef matches it exactly. An API key bound to accounts lists only those.","tags":["Accounts"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"externalRef","in":"query","schema":{"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"q","in":"query","schema":{"type":"string","minLength":1,"maxLength":200},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/AccountStatus"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"orgConnectionId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"delegateAccountId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"accounts.create","summary":"Connect an account from an existing refresh token","description":"The address is the provider's (Google's userinfo, Graph's /me).","tags":["Accounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccount"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"settings.bodyStorage is cache or full and no object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_mismatch"},"status":{"const":400},"message":{"type":"string","default":"The OAuth app is for the other provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_secret_unreadable"},"status":{"const":400},"message":{"type":"string","default":"The OAuth app's client secret cannot be decrypted; replace it."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_configured"},"status":{"const":400},"message":{"type":"string","default":"No OAuth app is given and the platform has none for the provider (and cloud)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_grant"},"status":{"const":400},"message":{"type":"string","default":"The provider refuses the refresh token (revoked, expired or never valid)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_client"},"status":{"const":400},"message":{"type":"string","default":"The provider refuses the OAuth app's client credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"token_exchange_failed"},"status":{"const":400},"message":{"type":"string","default":"The provider's token endpoint refuses the refresh for another reason."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"scope_denied"},"status":{"const":400},"message":{"type":"string","default":"The grant lacks a scope the account needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"access_token_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refuses the access token the refresh returned."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"identity_failed"},"status":{"const":400},"message":{"type":"string","default":"The provider's identity answer names no address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"identity_unavailable"},"status":{"const":400},"message":{"type":"string","default":"Google has not verified the account's address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_storage"},"status":{"const":403},"message":{"type":"string","default":"settings.bodyStorage is cache or full and the tenant's plan does not include body storage."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include shared mailboxes (sharedMailboxesEnabled: true)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_accounts"},"status":{"const":403},"message":{"type":"string","default":"The tenant already has as many accounts as its plan allows."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_oauth_app"},"status":{"const":422},"message":{"type":"string","default":"oauthAppId names no OAuth app of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider's token or identity endpoint could not be reached."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/accounts/{accountId}":{"get":{"operationId":"accounts.get","summary":"Get an account","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"accounts.update","summary":"Update an account","description":"Changing settings.bodyStorage, calendarEnabled or syncWindowDays restarts the account's syncs: full stores every indexed message and backfills, none deletes stored content. status only moves between active and paused; only a new grant clears reauth_required and disabled.","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"externalRef":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"status":{"$ref":"#/components/schemas/SettableAccountStatus"},"settings":{"$ref":"#/components/schemas/SettingsOverride"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"settings.bodyStorage is cache or full and no object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_storage"},"status":{"const":403},"message":{"type":"string","default":"settings.bodyStorage is cache or full and the tenant's plan does not include body storage."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"status is changed on an account that must be reconnected."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"status is changed on a disabled account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"accounts.delete","summary":"Delete an account","description":"Stops syncing and removes the credential at once. The account's data is purged for good after the retention period (default 30 days), or as soon as the maintenance role gets to it with ?purge=true; account.purged announces it. Its events are left to age out of the event log (within 31 days). purge=true also purges an account that is already deleted.","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"purge","in":"query","schema":{"anyOf":[{"type":"boolean"},{"enum":["true","false"],"type":"string"}],"default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or (without purge) is already deleted."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/tokens":{"post":{"operationId":"accounts.mintToken","summary":"Mint an account-scoped token","description":"The token is returned once; it is not retrievable later.","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ttlSeconds":{"type":"integer","minimum":60,"maximum":86400,"default":900}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountToken"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/mcp-keys":{"post":{"operationId":"mcpKeys.create","summary":"Mint an MCP key for an account's user","description":"The key is returned once; it is not retrievable later. It works only at the MCP server (mcpUrl, sent as `Authorization: Bearer <key>`), only for this account and with these scopes; every other route answers it with mcp_only_key. MCP clients that send a header take it (Claude Code, Cursor, Codex and the like); Claude.ai and ChatGPT custom connectors sign in with OAuth instead. Needs the admin scope and a key that is not bound to accounts. Revoked with the account when it is deleted.","tags":["MCP keys"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"default":"MCP"},"scopes":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/McpKeyScope"}},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["scopes"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedMcpKey"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_key_limit"},"status":{"const":409},"message":{"type":"string","default":"The account already has 25 live MCP keys; revoke one first."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"get":{"operationId":"mcpKeys.list","summary":"List an account's MCP keys","description":"Newest first, without their secrets; revoked keys are left out.","tags":["MCP keys"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpKeyList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/mcp-keys/{keyId}":{"delete":{"operationId":"mcpKeys.delete","summary":"Revoke an MCP key","description":"The MCP server refuses the key from its next request on.","tags":["MCP keys"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_key_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no live MCP key with this id."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/mailboxes":{"get":{"operationId":"mailboxes.list","summary":"List mailboxes (folders or labels)","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/messages":{"get":{"operationId":"messages.list","summary":"List messages, newest first","description":"Covers the account's sync window. Without mailboxId, lists every mailbox. importance keeps the messages with that priority; messages indexed before priorities were read (importance null) match none.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"mailboxId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"unread","in":"query","schema":{"anyOf":[{"type":"boolean"},{"enum":["true","false"],"type":"string"}]},"allowEmptyValue":true,"allowReserved":true},{"name":"importance","in":"query","schema":{"$ref":"#/components/schemas/MessagePriority"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSummaryPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_mailbox"},"status":{"const":422},"message":{"type":"string","default":"A mailbox id names no live mailbox of the account; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/messages/{messageId}":{"get":{"operationId":"messages.get","summary":"Get a message with its body","description":"With bodyStorage cache or full the body comes from stored content (cache fetches and stores the raw message on a miss), and attachment ids are MIME part numbers (\"1.2\"); otherwise it is read from the provider. Drafts are always read from the provider.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused to serve the message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"message_not_found"},"status":{"const":404},"message":{"type":"string","default":"The message does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the message or the attachment."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"messages.update","summary":"Change flags, move, or change labels","description":"mailboxId moves the message (Microsoft folders, or Gmail: replaces the message's folder-like labels). addMailboxIds/removeMailboxIds apply Gmail labels.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"isRead":{"type":"boolean"},"isFlagged":{"type":"boolean"},"mailboxId":{"type":"string","format":"uuid"},"addMailboxIds":{"type":"array","maxItems":50,"items":{"type":"string","format":"uuid"}},"removeMailboxIds":{"type":"array","maxItems":50,"items":{"type":"string","format":"uuid"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSummary"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mailbox_not_label"},"status":{"const":400},"message":{"type":"string","default":"addMailboxIds or removeMailboxIds names a mailbox that is not a label."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider rejected the change as invalid."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider does not support the change."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the change for lack of permission."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"message_not_found"},"status":{"const":404},"message":{"type":"string","default":"The message does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the item."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The provider refused the change because of the item's state."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_mailbox"},"status":{"const":422},"message":{"type":"string","default":"A mailbox id names no live mailbox of the account; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"messages.delete","summary":"Delete a message","description":"Moves it to Trash; ?permanent=true deletes it outright.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"permanent","in":"query","schema":{"anyOf":[{"type":"boolean"},{"enum":["true","false"],"type":"string"}],"default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider rejected the change as invalid."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider does not support the change."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the change for lack of permission."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"message_not_found"},"status":{"const":404},"message":{"type":"string","default":"The message does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the item."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The provider refused the change because of the item's state."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/messages/{messageId}/raw":{"get":{"operationId":"messages.raw","summary":"Download the message as RFC 5322 (message/rfc822)","description":"Served from stored content when the account stores bodies.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The message as message/rfc822","content":{"message/rfc822":{"schema":{"type":"string","contentMediaType":"message/rfc822"}}},"headers":{"content-disposition":{"description":"Always `attachment; filename=\"...\"`","schema":{"type":"string"}},"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused to serve the message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"message_not_found"},"status":{"const":404},"message":{"type":"string","default":"The message does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the message or the attachment."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/messages/{messageId}/attachments/{attachmentId}":{"get":{"operationId":"messages.attachment","summary":"Download an attachment","description":"Served from stored content when the account stores bodies; an id the stored message does not have is asked of the provider, which answers provider_not_found when it has no such attachment either.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024}}],"responses":{"200":{"description":"The attachment, with the Content-Type it was sent with","content":{"*/*":{"schema":{"type":"string","contentMediaType":"*/*"}}},"headers":{"content-disposition":{"description":"Always `attachment; filename=\"...\"`","schema":{"type":"string"}},"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused to serve the message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"message_not_found"},"status":{"const":404},"message":{"type":"string","default":"The message does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the message or the attachment."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The provider is needed and the account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/search/messages":{"get":{"operationId":"search.messages","summary":"Search messages","description":"source=index searches the index with full-text search (q in web search syntax: words, \"phrases\", OR, -word) over subject, sender and recipient names and addresses, the snippet, and the body text of stored messages (bodyStorage cache or full), best matches first. source=provider passes q to the provider unchanged (Gmail search syntax, Microsoft KQL, IMAP SEARCH TEXT), newest first; results the index holds carry their id, others id null. source=auto (default) asks the provider when the index cannot cover the request: `after` lies before the sync window, or the index found nothing while it does not hold everything (the account has a sync window, or bodyStorage is not full). Otherwise, and whenever the provider cannot be asked (inactive account, rate limit, provider error), the index answers. The response names the source that answered; nextCursor stays with it. A provider search of a Gmail account counts against the account's Gmail searches per minute; past them it answers rate_limited with Retry-After.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":500},"allowEmptyValue":true,"allowReserved":true},{"name":"mailboxId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"after","in":"query","required":false,"schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"before","in":"query","required":false,"schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SearchSource","default":"auto"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"before is not after after."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is invalid, was issued for another account, or is a provider cursor older than an hour."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"With source=provider, the provider rejected q."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"With source=provider, the provider cannot run the search."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"With source=provider, the provider refused the search."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"With source=provider, the account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"With source=provider, the account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"With source=provider, the account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"With source=provider, the account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_mailbox"},"status":{"const":422},"message":{"type":"string","default":"A mailbox id names no live mailbox of the account; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/threads":{"get":{"operationId":"threads.list","summary":"List threads, latest activity first","description":"Covers the account's sync window. With mailboxId, lists threads with a message in that mailbox, ordered by their latest message there; each summary still describes the whole thread.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"mailboxId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadSummaryPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_mailbox"},"status":{"const":422},"message":{"type":"string","default":"A mailbox id names no live mailbox of the account; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/threads/{threadId}":{"get":{"operationId":"threads.get","summary":"Get a thread with its messages, oldest first","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"thread_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no message in the thread."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"threads.update","summary":"Mark a thread read or unread, or move it","description":"Applies the change to every message of the thread through the message operations; messages already in that state are skipped. mailboxId moves each message there (Gmail: replaces its folder-like labels). A failure part way leaves the messages done so far changed; repeating the call finishes the rest.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"isRead":{"type":"boolean"},"mailboxId":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider rejected the change as invalid."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider does not support the change."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the change for lack of permission."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"thread_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no message in the thread."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the item."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The provider refused the change because of the item's state."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_mailbox"},"status":{"const":422},"message":{"type":"string","default":"A mailbox id names no live mailbox of the account; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"threads.delete","summary":"Move a thread to Trash","description":"Moves every message of the thread that is not already there to Trash. A failure part way leaves the messages done so far changed; repeating the call finishes the rest.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider rejected the change as invalid."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider does not support the change."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the change for lack of permission."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"thread_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no message in the thread."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the item."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The provider refused the change because of the item's state."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/drafts":{"post":{"operationId":"drafts.create","summary":"Create a draft","description":"Content is rendered when the request is taken, so later template edits never change it.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"cc":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"bcc":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"replyTo":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"subject":{"type":"string","maxLength":998},"text":{"type":"string","maxLength":2097152},"html":{"type":"string","maxLength":2097152},"attachments":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/AttachmentInput"},"default":[]},"inReplyToMessageId":{"type":"string","format":"uuid"},"from":{"$ref":"#/components/schemas/AddressInput"},"signature":{"type":"boolean"},"priority":{"$ref":"#/components/schemas/MessagePriority","default":"normal"},"template":{"type":"string","format":"uuid"},"render":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/RenderParams","default":{}}}},"previewText":{"type":"string","maxLength":2000},"format":{"$ref":"#/components/schemas/TemplateFormat"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSummary"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"from_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"from is not one of the account's identities."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"attachments_too_large"},"status":{"const":400},"message":{"type":"string","default":"The attachments exceed the provider's limit."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_account_mismatch"},"status":{"const":400},"message":{"type":"string","default":"The template is bound to another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_and_inline_fields"},"status":{"const":400},"message":{"type":"string","default":"template comes with an inline subject, html, text, previewText or format."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_template"},"status":{"const":400},"message":{"type":"string","default":"Inline content to render is not valid Handlebars or uses partials or decorators; data.field names the field."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"params_too_large"},"status":{"const":400},"message":{"type":"string","default":"params exceed 262144 bytes as JSON."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_render_failed"},"status":{"const":400},"message":{"type":"string","default":"Rendering fails (a missing helper, more than 10000 block iterations, a field rendered past its limit, Markdown longer than 100000 characters, rendered or not); data.field names the field."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider rejected the change as invalid."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider does not support the change."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the change for lack of permission."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the item."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The provider refused the change because of the item's state."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_reply_target"},"status":{"const":422},"message":{"type":"string","default":"inReplyToMessageId names no message of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_template"},"status":{"const":422},"message":{"type":"string","default":"template names no template of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"draft_lost"},"status":{"const":502},"message":{"type":"string","default":"The provider took the draft but did not answer it back."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/drafts/{messageId}":{"put":{"operationId":"drafts.update","summary":"Replace a draft's content","description":"Content is rendered when the request is taken, so later template edits never change it.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"cc":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"bcc":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"replyTo":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"subject":{"type":"string","maxLength":998},"text":{"type":"string","maxLength":2097152},"html":{"type":"string","maxLength":2097152},"attachments":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/AttachmentInput"},"default":[]},"inReplyToMessageId":{"type":"string","format":"uuid"},"from":{"$ref":"#/components/schemas/AddressInput"},"signature":{"type":"boolean"},"priority":{"$ref":"#/components/schemas/MessagePriority","default":"normal"},"template":{"type":"string","format":"uuid"},"render":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/RenderParams","default":{}}}},"previewText":{"type":"string","maxLength":2000},"format":{"$ref":"#/components/schemas/TemplateFormat"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSummary"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"from_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"from is not one of the account's identities."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"attachments_too_large"},"status":{"const":400},"message":{"type":"string","default":"The attachments exceed the provider's limit."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_account_mismatch"},"status":{"const":400},"message":{"type":"string","default":"The template is bound to another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_and_inline_fields"},"status":{"const":400},"message":{"type":"string","default":"template comes with an inline subject, html, text, previewText or format."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_template"},"status":{"const":400},"message":{"type":"string","default":"Inline content to render is not valid Handlebars or uses partials or decorators; data.field names the field."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"params_too_large"},"status":{"const":400},"message":{"type":"string","default":"params exceed 262144 bytes as JSON."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_render_failed"},"status":{"const":400},"message":{"type":"string","default":"Rendering fails (a missing helper, more than 10000 block iterations, a field rendered past its limit, Markdown longer than 100000 characters, rendered or not); data.field names the field."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider rejected the change as invalid."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider does not support the change."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the change for lack of permission."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the item."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"draft_not_found"},"status":{"const":404},"message":{"type":"string","default":"The message does not exist or is no draft."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The provider refused the change because of the item's state."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_reply_target"},"status":{"const":422},"message":{"type":"string","default":"inReplyToMessageId names no message of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_template"},"status":{"const":422},"message":{"type":"string","default":"template names no template of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"drafts.delete","summary":"Delete a draft","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider rejected the change as invalid."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider does not support the change."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the change for lack of permission."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"draft_not_found"},"status":{"const":404},"message":{"type":"string","default":"The message does not exist or is no draft."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the item."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The provider refused the change because of the item's state."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/drafts/{messageId}/send":{"post":{"operationId":"drafts.send","summary":"Send a draft","description":"A message without a sendAt later than the account's undo window (undoSendSeconds) from now waits out the window; undoUntil says until when cancelling the entry (DELETE .../outbox/{outboxId}) undoes the send. With tracking, the HTML part gets a 1x1 pixel (opens) and its http(s) links point at workwae's redirect (clicks), reported as message.opened and message.clicked and counted on the outbox entry; text parts are left as they are. With clicks, tracking.honeypot (else the account's trackingHoneypot) also adds one hidden link only machines follow; it does nothing without clicks, so asking for it with clicks off is refused rather than ignored. Tracking is per message, not per recipient: every recipient gets the same MIME. A Gmail or Microsoft 365 draft is sent by the provider as it is stored, so it is never tracked (the account's defaults do not apply); an IMAP draft is. A cancelled draft-send leaves the draft in place.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"sendAt":{"type":"string","format":"date-time","x-native-type":"date"},"reference":{"type":"string","maxLength":255},"tracking":{"$ref":"#/components/schemas/SendTracking"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedSend"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_a_draft"},"status":{"const":400},"message":{"type":"string","default":"The message stopped being a draft while the send was queued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"no_recipients"},"status":{"const":400},"message":{"type":"string","default":"The draft has no to, cc or bcc recipients (as last indexed)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"tracking_unsupported"},"status":{"const":400},"message":{"type":"string","default":"Tracking (opens, clicks or honeypot) is asked for a Gmail or Microsoft 365 draft."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"honeypot_needs_click_tracking"},"status":{"const":400},"message":{"type":"string","default":"tracking.honeypot is true and click tracking is off."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"Tracking is asked for and the tenant's plan does not include it (nor do the account's tracking defaults apply then)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_sends"},"status":{"const":403},"message":{"type":"string","default":"The tenant already queued as many sends today (UTC) as its plan allows."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"draft_not_found"},"status":{"const":404},"message":{"type":"string","default":"The message does not exist or is no draft."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/outbox":{"post":{"operationId":"outbox.create","summary":"Send a message","description":"Queues the message as an outbox entry; delivery is reported with send.sent, send.retrying and send.failed events carrying its id as outboxId, and a later bounce with message.bounced. Delivery is at-least-once, except outcome_unknown (below), and without order across retries: an account's entries are first tried in queue order, but one backing off after a failed attempt does not hold up the later ones. A retry first looks for a copy that already went out. When no SMTP reply comes after the final dot was handed to the operating system (the connection dropped or timed out, or the attempt ran out of time), the server may have accepted the message, so it is not sent again: send.failed carries code outcome_unknown and the client app decides whether to resend. A message without a sendAt later than the account's undo window (undoSendSeconds) from now waits out the window; undoUntil says until when cancelling the entry (DELETE .../outbox/{outboxId}) undoes the send. With tracking, the HTML part gets a 1x1 pixel (opens) and its http(s) links point at workwae's redirect (clicks), reported as message.opened and message.clicked and counted on the outbox entry; text parts are left as they are. With clicks, tracking.honeypot (else the account's trackingHoneypot) also adds one hidden link only machines follow; it does nothing without clicks, so asking for it with clicks off is refused rather than ignored. Tracking is per message, not per recipient: every recipient gets the same MIME. With listId, content is always rendered, `{{rcpt.unsubscribeUrl}}`, `{{rcpt.address}}` and `{{rcpt.name}}` are the recipient's, and the message carries List-Unsubscribe with that same URL and List-Unsubscribe-Post: List-Unsubscribe=One-Click (RFC 8058). Click tracking never rewrites a List-Unsubscribe URL, so the body's link stays as written. A recipient on that list or on the global list is not sent to, at queue time and again at delivery (send.failed with code suppressed). Without listId no list is consulted. Whether the provider's DKIM signature covers the List-Unsubscribe headers is up to its signing. For one message per recipient, see POST .../mail-merges. Content is rendered when the request is taken, so later template edits never change it. An unknown field is refused.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"cc":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"bcc":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"replyTo":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"subject":{"type":"string","maxLength":998},"text":{"type":"string","maxLength":2097152},"html":{"type":"string","maxLength":2097152},"attachments":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/AttachmentInput"},"default":[]},"inReplyToMessageId":{"type":"string","format":"uuid"},"from":{"$ref":"#/components/schemas/AddressInput"},"signature":{"type":"boolean"},"priority":{"$ref":"#/components/schemas/MessagePriority","default":"normal"},"template":{"type":"string","format":"uuid"},"render":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/RenderParams","default":{}}}},"previewText":{"type":"string","maxLength":2000},"format":{"$ref":"#/components/schemas/TemplateFormat"},"sendAt":{"type":"string","format":"date-time","x-native-type":"date"},"reference":{"type":"string","maxLength":255},"tracking":{"$ref":"#/components/schemas/SendTracking"},"listId":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedSend"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"from_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"from is not one of the account's identities."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"attachments_too_large"},"status":{"const":400},"message":{"type":"string","default":"The attachments exceed the provider's limit."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_account_mismatch"},"status":{"const":400},"message":{"type":"string","default":"The template is bound to another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_and_inline_fields"},"status":{"const":400},"message":{"type":"string","default":"template comes with an inline subject, html, text, previewText or format."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_template"},"status":{"const":400},"message":{"type":"string","default":"Inline content to render is not valid Handlebars or uses partials or decorators; data.field names the field."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"params_too_large"},"status":{"const":400},"message":{"type":"string","default":"params exceed 262144 bytes as JSON."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_render_failed"},"status":{"const":400},"message":{"type":"string","default":"Rendering fails (a missing helper, more than 10000 block iterations, a field rendered past its limit, Markdown longer than 100000 characters, rendered or not); data.field names the field."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"no_recipients"},"status":{"const":400},"message":{"type":"string","default":"to, cc and bcc are all empty."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"list_send_recipients"},"status":{"const":400},"message":{"type":"string","default":"listId is given and the message has not exactly one to and no cc or bcc."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"suppressed"},"status":{"const":400},"message":{"type":"string","default":"listId is given and the recipient is on that list or the global list."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"honeypot_needs_click_tracking"},"status":{"const":400},"message":{"type":"string","default":"tracking.honeypot is true and click tracking is off."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"list_unsubscribe_unavailable"},"status":{"const":400},"message":{"type":"string","default":"listId is given and TRACKING_BASE_URL is not https."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"Tracking is asked for and the tenant's plan does not include it (nor do the account's tracking defaults apply then)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_sends"},"status":{"const":403},"message":{"type":"string","default":"The tenant already queued as many sends today (UTC) as its plan allows."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_reply_target"},"status":{"const":422},"message":{"type":"string","default":"inReplyToMessageId names no message of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_template"},"status":{"const":422},"message":{"type":"string","default":"template names no template of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"get":{"operationId":"outbox.list","summary":"List queued and recent sends, newest first","description":"status keeps the entries in that status.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/OutboxStatus"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboxEntryPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/outbox/{outboxId}":{"get":{"operationId":"outbox.get","summary":"Get a send","description":"One entry with its tracking counts, for as long as the outbox keeps it: a sent message's outboxId names it.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"outboxId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboxEntry"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"send_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no such outbox entry."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"outbox.cancel","summary":"Cancel a queued send","description":"Undoes a send while it waits for its sendAt.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"outboxId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"send_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no such outbox entry."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"send_not_cancellable"},"status":{"const":409},"message":{"type":"string","default":"The entry is no longer queued: it is being sent, was sent, failed for good or was cancelled (the message names which)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"outbox.reschedule","summary":"Reschedule a queued send","description":"Moves sendAt, earlier or later; a past sendAt sends as soon as possible. Announced as send.rescheduled.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"outboxId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sendAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["sendAt"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboxEntry"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"send_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no such outbox entry."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"send_not_reschedulable"},"status":{"const":409},"message":{"type":"string","default":"The entry is no longer queued (it is being sent, was sent, failed for good or was cancelled), or it is queued again after a failed attempt; the message names which."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/outbox/{outboxId}/tracking":{"get":{"operationId":"outbox.tracking","summary":"List a send's opens and clicks","description":"Newest first. At most 1000 are kept per send (the counts on the entry keep going), each for the tracking retention period. Each event carries what its request showed: the method (GET or HEAD), the Referer and Origin hosts, the mail client (Gmail's image proxy, web or app; Outlook on the web, desktop or mobile; Apple Mail and its Mail Privacy Protection; Yahoo, AOL, Thunderbird, Proton, Fastmail, Zoho, iCloud, a self-hosted webmail; else unknown), the device, OS and browser families, Cloudflare's visitor location (country, region, city, timezone, latitude and longitude, behind a trusted proxy only), the seconds after the send and since the send's previous hit, its sequence number, whether it was conditional, a Range request or a prefetch, the sec-fetch tuple, and the request headers (lower-cased, values cut at 1024 characters, at most 64, never Cookie, Authorization or Proxy-Authorization, forwarding and cf-* headers only from the trusted proxy; the full Referer is only here). Full addresses and headers stay with the tenant for the retention period.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"outboxId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingEventPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"send_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no such outbox entry."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/mail-merges":{"post":{"operationId":"mailMerges.create","summary":"Send one message per recipient (mail merge)","description":"Each of at most 100 entries becomes its own outbox entry and message, addressed to its to alone, with its own Message-ID, events, bounce matching and tracking; the answer has one result per entry, in order. Content is rendered per entry with its params (a template always; inline content only for entries that carry params, or with listId). An entry that cannot be queued fails alone, its result naming the reason (invalid_recipient, invalid_message_id, duplicate_message_id, template_render_failed, plan_limit_sends once the day's sends run out, suppressed when listId is given and the address is on that list or the global list, internal_error), while the others go ahead; the call itself succeeds. The body is the send body without to, cc, bcc and render: an unknown field is refused. Delivery is at-least-once, except outcome_unknown (below), and without order across retries: an account's entries are first tried in queue order, but one backing off after a failed attempt does not hold up the later ones. A retry first looks for a copy that already went out. When no SMTP reply comes after the final dot was handed to the operating system (the connection dropped or timed out, or the attempt ran out of time), the server may have accepted the message, so it is not sent again: send.failed carries code outcome_unknown and the client app decides whether to resend. A message without a sendAt later than the account's undo window (undoSendSeconds) from now waits out the window; undoUntil says until when cancelling the entry (DELETE .../outbox/{outboxId}) undoes the send. With tracking, the HTML part gets a 1x1 pixel (opens) and its http(s) links point at workwae's redirect (clicks), reported as message.opened and message.clicked and counted on the outbox entry; text parts are left as they are. With clicks, tracking.honeypot (else the account's trackingHoneypot) also adds one hidden link only machines follow; it does nothing without clicks, so asking for it with clicks off is refused rather than ignored. Tracking is per message, not per recipient: every recipient gets the same MIME. With listId, content is always rendered, `{{rcpt.unsubscribeUrl}}`, `{{rcpt.address}}` and `{{rcpt.name}}` are the recipient's, and the message carries List-Unsubscribe with that same URL and List-Unsubscribe-Post: List-Unsubscribe=One-Click (RFC 8058). Click tracking never rewrites a List-Unsubscribe URL, so the body's link stays as written. A recipient on that list or on the global list is not sent to, at queue time and again at delivery (send.failed with code suppressed). Without listId no list is consulted. Whether the provider's DKIM signature covers the List-Unsubscribe headers is up to its signing. What holds for the whole call is checked once and refuses it. Content is rendered when the request is taken, so later template edits never change it. Answers 200: the merge itself is not kept, its entries are in the outbox.","tags":["Mail"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replyTo":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/AddressInput"},"default":[]},"subject":{"type":"string","maxLength":998},"text":{"type":"string","maxLength":2097152},"html":{"type":"string","maxLength":2097152},"attachments":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/AttachmentInput"},"default":[]},"inReplyToMessageId":{"type":"string","format":"uuid"},"from":{"$ref":"#/components/schemas/AddressInput"},"signature":{"type":"boolean"},"priority":{"$ref":"#/components/schemas/MessagePriority","default":"normal"},"template":{"type":"string","format":"uuid"},"previewText":{"type":"string","maxLength":2000},"format":{"$ref":"#/components/schemas/TemplateFormat"},"sendAt":{"type":"string","format":"date-time","x-native-type":"date"},"reference":{"type":"string","maxLength":255},"tracking":{"$ref":"#/components/schemas/SendTracking"},"listId":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"entries":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/MailMergeEntry"}}},"required":["entries"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailMergeResultList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"from_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"from is not one of the account's identities."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"attachments_too_large"},"status":{"const":400},"message":{"type":"string","default":"The attachments exceed the provider's limit, or the attachments times the entries exceed 52428800 bytes."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_account_mismatch"},"status":{"const":400},"message":{"type":"string","default":"The template is bound to another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_and_inline_fields"},"status":{"const":400},"message":{"type":"string","default":"template comes with an inline subject, html, text, previewText or format."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_template"},"status":{"const":400},"message":{"type":"string","default":"Inline content to render is not valid Handlebars or uses partials or decorators; data.field names the field."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"params_too_large"},"status":{"const":400},"message":{"type":"string","default":"params exceed 262144 bytes as JSON."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_render_failed"},"status":{"const":400},"message":{"type":"string","default":"Rendering fails (a missing helper, more than 10000 block iterations, a field rendered past its limit, Markdown longer than 100000 characters, rendered or not); data.field names the field."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"honeypot_needs_click_tracking"},"status":{"const":400},"message":{"type":"string","default":"tracking.honeypot is true and click tracking is off."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"list_unsubscribe_unavailable"},"status":{"const":400},"message":{"type":"string","default":"listId is given and TRACKING_BASE_URL is not https."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"Tracking is asked for and the tenant's plan does not include it (nor do the account's tracking defaults apply then)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_reply_target"},"status":{"const":422},"message":{"type":"string","default":"inReplyToMessageId names no message of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_template"},"status":{"const":422},"message":{"type":"string","default":"template names no template of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/templates":{"get":{"operationId":"templates.list","summary":"List templates","description":"Newest first, without their content (GET /v1/templates/{templateId} has it). accountId lists those bound to that account; usableBy those the account may send with (the tenant's shared ones and its own); name the ones of that exact name, one per scope; query those whose name contains it, ignoring case.","tags":["Templates"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"accountId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"usableBy","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"name","in":"query","schema":{"type":"string","maxLength":255},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string","maxLength":255},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSummaryPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"templates.create","summary":"Create a template","description":"Every field is checked to compile as Handlebars.","tags":["Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplate"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_template"},"status":{"const":400},"message":{"type":"string","default":"A field is not valid Handlebars or uses partials or decorators (data names the field, the message is the parser's)."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_name_taken"},"status":{"const":409},"message":{"type":"string","default":"The scope (the tenant, or the bound account) already has a template of that name."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"The accountId names an account the tenant does not have (data lists it)."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/templates/{templateId}":{"get":{"operationId":"templates.get","summary":"Get a template","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_not_found"},"status":{"const":404},"message":{"type":"string","default":"The template does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"templates.update","summary":"Update a template","description":"Only the fields given change; queued sends keep what they were rendered with.","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"subject":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"html":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]},"text":{"anyOf":[{"type":"string","maxLength":1000000},{"type":"null"}]},"previewText":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"format":{"$ref":"#/components/schemas/TemplateFormat"},"source":{"$ref":"#/components/schemas/TemplateSource"},"externalRef":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_template"},"status":{"const":400},"message":{"type":"string","default":"A field is not valid Handlebars or uses partials or decorators (data names the field, the message is the parser's)."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_not_found"},"status":{"const":404},"message":{"type":"string","default":"The template does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_name_taken"},"status":{"const":409},"message":{"type":"string","default":"The scope (the tenant, or the bound account) already has a template of that name."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"templates.delete","summary":"Delete a template","description":"Queued sends keep their rendered content.","tags":["Templates"],"parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_not_found"},"status":{"const":404},"message":{"type":"string","default":"The template does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/template-renders":{"post":{"operationId":"templateRenders.create","summary":"Render a template without sending","description":"Renders a stored template (templateId) or inline fields with params, as a send would. account.email and account.name come from accountId, else from the template's own account, else render empty.","tags":["Templates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderTemplateRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderedTemplate"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_template"},"status":{"const":400},"message":{"type":"string","default":"A field is not valid Handlebars or uses partials or decorators (data names the field, the message is the parser's)."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_and_inline_fields"},"status":{"const":400},"message":{"type":"string","default":"The templateId comes with inline fields or format."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_account_mismatch"},"status":{"const":400},"message":{"type":"string","default":"The template is bound to another account than accountId."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"params_too_large"},"status":{"const":400},"message":{"type":"string","default":"The params exceed 262144 bytes as JSON."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"template_render_failed"},"status":{"const":400},"message":{"type":"string","default":"Rendering fails: a missing helper, more than 10000 block iterations, a field rendered past its limit, or Markdown longer than 100000 characters (data names the field)."},"data":{"$ref":"#/components/schemas/TemplateFieldData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"The accountId names an account the tenant does not have (data lists it)."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_template"},"status":{"const":422},"message":{"type":"string","default":"The templateId names no template of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/suppressions":{"get":{"operationId":"suppressions.list","summary":"List suppression lists","description":"The global list first, then every named list by listId, with its counts by source.","tags":["Suppressions"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionListList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"suppressions.create","summary":"Create a suppression list","description":"id is what sends name as listId; it cannot change later, the name and description can. A send or add naming a list that does not exist creates it too, named after its id.","tags":["Suppressions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSuppressionList"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"suppression_list_exists"},"status":{"const":409},"message":{"type":"string","default":"A list with that id exists."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/suppressions/{listId}":{"patch":{"operationId":"suppressions.update","summary":"Update a suppression list","description":"Only the fields given change; description null clears it. The global list cannot be changed.","tags":["Suppressions"],"parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"suppression_list_not_found"},"status":{"const":404},"message":{"type":"string","default":"The list does not exist (the global list has none to change)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"suppressions.delete","summary":"Delete a suppression list","description":"Deletes the list and its pending reviews and, with ?withEntries=true, every address on it: later sends naming it reach those addresses again (unless the global list holds them), and the next one naming it creates it anew. The global list cannot be deleted.","tags":["Suppressions"],"parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"}},{"name":"withEntries","in":"query","schema":{"anyOf":[{"type":"boolean"},{"enum":["true","false"],"type":"string"}],"default":false},"allowEmptyValue":true,"allowReserved":true}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"suppression_list_not_found"},"status":{"const":404},"message":{"type":"string","default":"The list does not exist (the global list has none to change)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"suppression_list_not_empty"},"status":{"const":409},"message":{"type":"string","default":"The list holds addresses and withEntries is not true."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/suppressions/{listId}/entries":{"get":{"operationId":"suppressions.entries.list","summary":"List suppressed addresses","description":"Addresses on one list, by address; a list without addresses is empty, not missing. address keeps those containing it, source those that came from it.","tags":["Suppressions"],"parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"}},{"name":"address","in":"query","schema":{"type":"string","maxLength":320},"allowEmptyValue":true,"allowReserved":true},{"name":"source","in":"query","schema":{"$ref":"#/components/schemas/SuppressionSource"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionEntryPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"suppressions.entries.add","summary":"Suppress addresses","description":"Puts up to 1000 addresses on the list in one call; a repeated address counts once. added counts the addresses put on the list, alreadyListed those that were on it already, which are left as they were. A list that does not exist is created, named after its listId. Answers 200: entries are listed, not fetched one by one. Emits no suppression.created: that event reports what recipients and bounces did.","tags":["Suppressions"],"parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"addresses":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"string","maxLength":320,"format":"email"}},"reason":{"type":"string","minLength":1,"maxLength":200}},"required":["addresses"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionEntriesAdded"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/suppressions/{listId}/entries/{address}":{"delete":{"operationId":"suppressions.entries.remove","summary":"Release an address","description":"Later sends naming the list reach the address again (unless another list they consult holds it).","tags":["Suppressions"],"parameters":[{"name":"listId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"}},{"name":"address","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":320}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"suppression_entry_not_found"},"status":{"const":404},"message":{"type":"string","default":"The address is not on the list."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/suppression-reviews":{"get":{"operationId":"suppressionReviews.list","summary":"List opt-outs to review","description":"Detected opt-outs waiting for a person, newest first; listId keeps one list's. Holds AI-classified opt-out replies while optOutHandling is review, and auto-replies saying the person is no longer at the address (source inactive, on the global list) while it is review or suppress. A detection of an address already on its list, or already waiting, is not queued again.","tags":["Suppressions"],"parameters":[{"name":"listId","in":"query","schema":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionReviewPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/suppression-reviews/{reviewId}/approve":{"post":{"operationId":"suppressionReviews.approve","summary":"Approve an opt-out","description":"Puts the address on the review's list with the review's source and removes the review. added is false when the address was on the list already. Emits suppression.created when it was not.","tags":["Suppressions"],"parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionAdded"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"suppression_review_not_found"},"status":{"const":404},"message":{"type":"string","default":"The review does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/suppression-reviews/{reviewId}/dismiss":{"post":{"operationId":"suppressionReviews.dismiss","summary":"Dismiss an opt-out","description":"Removes the review without suppressing anything; a later detection of the same address queues it again.","tags":["Suppressions"],"parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"suppression_review_not_found"},"status":{"const":404},"message":{"type":"string","default":"The review does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/identities":{"get":{"operationId":"identities.list","summary":"List the addresses the account may send as","description":"The account's own address, the provider's (Gmail send-as addresses with their Gmail signatures in one users.settings.sendAs request; Microsoft proxy addresses from /me) and custom ones. The provider's list is read when the cached one is a day old, or with refresh=true at most once a minute; a paused or disconnected account serves the cached list.","tags":["Identities"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"refresh","in":"query","schema":{"anyOf":[{"type":"boolean"},{"enum":["true","false"],"type":"string"}]},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"Reading the provider's list found that the account must be reconnected."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"identities.create","summary":"Add a custom identity","description":"For IMAP aliases, and Microsoft mailboxes the account has Send As permission on (Graph cannot list those). Sending as it is checked by the provider when the message goes out.","tags":["Identities"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":256},"address":{"type":"string","maxLength":320,"format":"email"},"signature":{"$ref":"#/components/schemas/SignatureInput"}},"required":["address"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"identities_managed_by_provider"},"status":{"const":400},"message":{"type":"string","default":"The account is a Gmail account (add send-as addresses in Gmail)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"identity_exists"},"status":{"const":409},"message":{"type":"string","default":"The address is already an identity of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/identities/{identityId}":{"patch":{"operationId":"identities.update","summary":"Change an identity's signature or name","description":"signature: null removes ours (Gmail's own then applies again). Only custom identities take a name; the others carry the provider's.","tags":["Identities"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identityId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]},"signature":{"anyOf":[{"$ref":"#/components/schemas/SignatureInput"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"identity_not_custom"},"status":{"const":400},"message":{"type":"string","default":"A name is given for a primary or provider identity."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"identity_not_found"},"status":{"const":404},"message":{"type":"string","default":"The identity does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"identities.delete","summary":"Remove a custom identity","tags":["Identities"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identityId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"identity_not_custom"},"status":{"const":400},"message":{"type":"string","default":"The identity is the primary or a provider identity (those follow the provider)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"identity_not_found"},"status":{"const":404},"message":{"type":"string","default":"The identity does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/mail-settings":{"get":{"operationId":"mailSettings.get","summary":"Get the account's mail settings","tags":["Identities"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailSettings"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"mailSettings.update","summary":"Update the account's mail settings","tags":["Identities"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"signByDefault":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailSettings"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/calendars":{"get":{"operationId":"calendars.list","summary":"List calendars","tags":["Calendar"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's calendar sync is off, or it is an IMAP account without CalDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/calendar-events":{"get":{"operationId":"calendarEvents.list","summary":"List events in a time range, by start","description":"Returns singles, occurrences and exceptions overlapping [start, end), not series definitions. Only the sync window (by default 90 days back to 365 days ahead) is indexed.","tags":["Calendar"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"calendarId","in":"query","required":false,"schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"end is not after start, or the range spans more than 400 days."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's calendar sync is off, or it is an IMAP account without CalDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_calendar"},"status":{"const":422},"message":{"type":"string","default":"calendarId names no synced calendar of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"calendarEvents.create","summary":"Create an event or a recurring series","description":"onlineMeeting asks the provider for a Teams (Microsoft) or Meet (Google) link; onlineMeetingUrl attaches a link from another service (Zoom, Webex, ...), read back as onlineMeetingUrl. On Microsoft that link is the location's link (location defaults to the URL) and a join line is added to a body sent along. onlineMeetingService has workwae create a Zoom or Webex meeting (recurring for a series) hosted by the account's own grant at the service, else by the tenant's server app as the service user with the mailbox's address, and attaches its join link the same way. The server app hosts only accounts whose address the provider verified (Gmail, Microsoft, IMAP signed in with OAuth): a password IMAP account's address is whatever was typed, so it needs its own grant. The meeting is created only once the account is active, and deleted again if anything fails before its link is saved. On an IMAP account whose CalDAV server does not schedule, the invitation is mailed from the account's SMTP server when notify is true and there are attendees; a missing SMTP server is refused before anything is created, and a send that fails after the event is created is logged and the event stands.","tags":["Calendar"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calendarId":{"type":"string","format":"uuid"},"subject":{"type":"string","maxLength":255},"body":{"type":"object","properties":{"contentType":{"$ref":"#/components/schemas/BodyContentType"},"content":{"type":"string","maxLength":1000000}},"required":["contentType","content"]},"location":{"type":"string","maxLength":255},"start":{"$ref":"#/components/schemas/EventTimeInput"},"end":{"$ref":"#/components/schemas/EventTimeInput"},"attendees":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AttendeeInput"},"default":[]},"recurrence":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","maxLength":1000,"pattern":"^(RRULE|RDATE|EXDATE)[:;]"}},"showAs":{"enum":["free","busy","tentative","oof","working_elsewhere"],"type":"string"},"sensitivity":{"$ref":"#/components/schemas/Sensitivity"},"reminderMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":40320},{"type":"null"}]},"onlineMeeting":{"type":"boolean","default":false},"onlineMeetingUrl":{"type":"string","maxLength":2048,"format":"uri"},"onlineMeetingService":{"$ref":"#/components/schemas/MeetingService"},"notify":{"type":"boolean","default":true}},"required":["calendarId","start","end"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventDetail"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider cannot express the request (e.g. a rule Microsoft has no pattern for), or an IMAP account whose CalDAV server does not schedule has no SMTP server to mail the iTIP message from."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request, or more than 500 attendees would be mailed an iTIP message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_time_zone"},"status":{"const":400},"message":{"type":"string","default":"A timed start or end names an unknown time zone."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mixed_event_times"},"status":{"const":400},"message":{"type":"string","default":"One end is timed and the other all-day."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"end is not after start."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_recurrence"},"status":{"const":400},"message":{"type":"string","default":"recurrence has no RRULE or RDATE line, or does not parse as RFC 5545."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_recurrence_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The service cannot repeat a meeting by the event's rule."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_service_rejected"},"status":{"const":400},"message":{"type":"string","default":"The service refused the meeting."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"multiple_meeting_options"},"status":{"const":400},"message":{"type":"string","default":"More than one of onlineMeeting, onlineMeetingUrl and onlineMeetingService is given."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include calendar, or onlineMeetingService is given and it does not include meetings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks calendar access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_read_only"},"status":{"const":403},"message":{"type":"string","default":"The account can only read the event's calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event or calendar is gone at the provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_not_found"},"status":{"const":404},"message":{"type":"string","default":"calendarId names no synced calendar of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_event_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the event when it is read back."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's calendar sync is off, or it is an IMAP account without CalDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The event changed at the provider meanwhile."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_service_not_connected"},"status":{"const":409},"message":{"type":"string","default":"The account has no connection to the service and the tenant no server app it may use (a password IMAP account may not use one)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_service_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account's connection or the tenant's server app was refused and must be connected or fixed again."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_host_missing"},"status":{"const":409},"message":{"type":"string","default":"The tenant's server app has no user with the mailbox's address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_service_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The service could not be reached."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/calendar-events/{eventId}":{"get":{"operationId":"calendarEvents.get","summary":"Get an event with its body","description":"Works for every kind, including a series (its recurrence rule).","tags":["Calendar"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventDetail"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider cannot express the request (e.g. a rule Microsoft has no pattern for), or an IMAP account whose CalDAV server does not schedule has no SMTP server to mail the iTIP message from."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request, or more than 500 attendees would be mailed an iTIP message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks calendar access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_event_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event does not exist in the account's synced calendars."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event or calendar is gone at the provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's calendar sync is off, or it is an IMAP account without CalDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"calendarEvents.update","summary":"Change an event, one occurrence, or a whole series","description":"Addressing an occurrence changes only that instance; addressing the series changes every occurrence. onlineMeetingUrl replaces a link from another service (as on create); null removes it (on Google, whatever conference the event has; on Microsoft, the location's link, leaving a Teams meeting alone). For an event whose Zoom or Webex meeting workwae created, a new subject, start, end or recurrence moves that meeting too, and an onlineMeetingUrl other than its own join link deletes it (sending that link back replaces nothing); changing one occurrence leaves the meeting's series as it is. A missing or refused meeting connection is reported before anything changes; a service failure after the event changed is reported with the event changed (repeat the request). On an IMAP account whose CalDAV server does not schedule, an update of a meeting the account organizes is mailed from its SMTP server when it changes start, end, recurrence, location or attendees, to the attendees workwae has indexed for it and those the request names; a missing SMTP server or too many attendees is refused before anything changes, and a send that fails after the change is logged and the change stands.","tags":["Calendar"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string","maxLength":255},"body":{"type":"object","properties":{"contentType":{"$ref":"#/components/schemas/BodyContentType"},"content":{"type":"string","maxLength":1000000}},"required":["contentType","content"]},"location":{"type":"string","maxLength":255},"start":{"$ref":"#/components/schemas/EventTimeInput"},"end":{"$ref":"#/components/schemas/EventTimeInput"},"attendees":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/AttendeeInput"}},"recurrence":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","maxLength":1000,"pattern":"^(RRULE|RDATE|EXDATE)[:;]"}},"showAs":{"enum":["free","busy","tentative","oof","working_elsewhere"],"type":"string"},"sensitivity":{"$ref":"#/components/schemas/Sensitivity"},"reminderMinutes":{"anyOf":[{"type":"integer","minimum":0,"maximum":40320},{"type":"null"}]},"onlineMeetingUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"notify":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEventDetail"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider cannot express the request (e.g. a rule Microsoft has no pattern for), or an IMAP account whose CalDAV server does not schedule has no SMTP server to mail the iTIP message from."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request, or more than 500 attendees would be mailed an iTIP message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_time_zone"},"status":{"const":400},"message":{"type":"string","default":"A timed start or end names an unknown time zone."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mixed_event_times"},"status":{"const":400},"message":{"type":"string","default":"One end is timed and the other all-day."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"end is not after start."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_recurrence"},"status":{"const":400},"message":{"type":"string","default":"recurrence has no RRULE or RDATE line, or does not parse as RFC 5545."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_recurrence_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The service cannot repeat a meeting by the event's rule."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_service_rejected"},"status":{"const":400},"message":{"type":"string","default":"The service refused the meeting."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"recurrence_on_instance"},"status":{"const":400},"message":{"type":"string","default":"recurrence is given for an occurrence or exception."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks calendar access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_read_only"},"status":{"const":403},"message":{"type":"string","default":"The account can only read the event's calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_event_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event does not exist in the account's synced calendars."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event or calendar is gone at the provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's calendar sync is off, or it is an IMAP account without CalDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The event changed at the provider meanwhile."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_service_not_connected"},"status":{"const":409},"message":{"type":"string","default":"The account has no connection to the service and the tenant no server app it may use (a password IMAP account may not use one)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_service_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account's connection or the tenant's server app was refused and must be connected or fixed again."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_deleted"},"status":{"const":409},"message":{"type":"string","default":"The event's meeting is gone at the service when it is moved."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_service_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The service could not be reached."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"calendarEvents.delete","summary":"Delete an event, one occurrence, or a whole series","description":"Cancels the meeting for its attendees when the account organizes it. A Zoom or Webex meeting workwae created for the event (a series, not one occurrence) is deleted after the provider event: a provider refusal leaves both, and once the event is gone a meeting the service cannot delete (connection gone or refused, service unreachable) is logged and stays at the service while the request still succeeds. On an IMAP account whose CalDAV server does not schedule, the cancellation is mailed from the account's SMTP server to the attendees workwae has indexed; a missing SMTP server or too many attendees is refused before anything is deleted, and a send that fails after the deletion is logged.","tags":["Calendar"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"notify","in":"query","schema":{"anyOf":[{"type":"boolean"},{"enum":["true","false"],"type":"string"}],"default":true},"allowEmptyValue":true,"allowReserved":true},{"name":"comment","in":"query","schema":{"type":"string","maxLength":2000},"allowEmptyValue":true,"allowReserved":true}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider cannot express the request (e.g. a rule Microsoft has no pattern for), or an IMAP account whose CalDAV server does not schedule has no SMTP server to mail the iTIP message from."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request, or more than 500 attendees would be mailed an iTIP message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks calendar access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_read_only"},"status":{"const":403},"message":{"type":"string","default":"The account can only read the event's calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_event_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event does not exist in the account's synced calendars."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event or calendar is gone at the provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's calendar sync is off, or it is an IMAP account without CalDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The event changed at the provider meanwhile."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/calendar-events/{eventId}/respond":{"post":{"operationId":"calendarEvents.respond","summary":"Accept, tentatively accept or decline an invitation","description":"Addressing an occurrence answers that instance; the series answers all of them. On an IMAP account whose CalDAV server does not schedule, the answer is mailed to the organizer from the account's SMTP server; a missing SMTP server is refused before anything changes, and a send that fails after the answer is recorded is logged.","tags":["Calendar"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{"$ref":"#/components/schemas/RsvpResponse"},"comment":{"type":"string","maxLength":2000},"notify":{"type":"boolean","default":true}},"required":["response"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalendarEvent"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider cannot express the request (e.g. a rule Microsoft has no pattern for), or an IMAP account whose CalDAV server does not schedule has no SMTP server to mail the iTIP message from."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request, or more than 500 attendees would be mailed an iTIP message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks calendar access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_event_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event does not exist in the account's synced calendars."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event or calendar is gone at the provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's calendar sync is off, or it is an IMAP account without CalDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The event changed at the provider meanwhile."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"organizer_cannot_respond"},"status":{"const":409},"message":{"type":"string","default":"The account organizes the event, so there is no invitation to answer."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/availability/find":{"post":{"operationId":"availability.find","summary":"Find busy times and common free slots","description":"A read sent as a POST, the question not fitting a URL. One provider request covers every attendee (Microsoft getSchedule, Google freeBusy.query); the answer is cached briefly per account, attendees and range.","tags":["Calendar"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attendees":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","maxLength":320,"format":"email"}},"start":{"type":"string","format":"date-time","x-native-type":"date"},"end":{"type":"string","format":"date-time","x-native-type":"date"},"durationMinutes":{"type":"integer","minimum":5,"maximum":1440,"default":30},"stepMinutes":{"type":"integer","minimum":5,"maximum":1440,"default":30},"timeZone":{"type":"string","minLength":1,"maxLength":64,"default":"UTC"},"workingHours":{"$ref":"#/components/schemas/WorkingHours"},"maxSuggestions":{"type":"integer","minimum":0,"maximum":100,"default":10},"includeAccount":{"type":"boolean","default":true}},"required":["attendees","start","end"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Availability"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider cannot express the request (e.g. a rule Microsoft has no pattern for), or an IMAP account whose CalDAV server does not schedule has no SMTP server to mail the iTIP message from."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request, or more than 500 attendees would be mailed an iTIP message."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"end is not after start, or the range spans more than 62 days."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_time_zone"},"status":{"const":400},"message":{"type":"string","default":"timeZone is unknown."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_working_hours"},"status":{"const":400},"message":{"type":"string","default":"workingHours does not end after it starts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include calendar."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks calendar access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event or calendar is gone at the provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"calendar_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's calendar sync is off, or it is an IMAP account without CalDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/meeting-connections":{"get":{"operationId":"meetingConnections.list","summary":"List an account's meeting connections","tags":["Meeting connections"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingConnectionList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include Zoom and Webex meetings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/meeting-connections/{service}":{"delete":{"operationId":"meetingConnections.delete","summary":"Remove a meeting connection","description":"Deletes the grant (and revokes it at Zoom); meetings created with it stay. Later events use the tenant's server app, if any. Allowed without the meetings module, so a tenant can remove a grant it no longer uses.","tags":["Meeting connections"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"service","in":"path","required":true,"schema":{"$ref":"#/components/schemas/MeetingService"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_connection_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account has no connection to the service."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/meeting-connect-sessions":{"post":{"operationId":"meetingConnectSessions.create","summary":"Create a hosted meeting connect session","description":"Returns a link to the hosted page where the account's user signs in to the service; the browser then returns to redirectUri with status=success|error, service, error and state, or without redirectUri to workwae's own confirmation page, which needs no allowlist entry. The sign-in passes a Continue page on the API origin naming the tenant, the service and the account, and must finish in the browser that pressed Continue (an HttpOnly cookie on the API origin); a callback in any other browser renders an error page and connects nothing. A session yields at most one grant: once one sign-in completed it, the others end with error=session_used, and one completing after expiresAt ends with error=session_expired. Connecting again replaces the account's grant for the service.","tags":["Meeting connections"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"service":{"$ref":"#/components/schemas/MeetingService"},"redirectUri":{"type":"string","format":"uri"},"meetingAppId":{"type":"string","format":"uuid"},"state":{"type":"string","maxLength":1024},"ttlSeconds":{"type":"integer","minimum":60,"maximum":86400,"default":3600}},"required":["service"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionLink"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"redirect_uri_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"redirectUri is not on the tenant's allowlist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_app_mismatch"},"status":{"const":400},"message":{"type":"string","default":"meetingAppId is not a sign-in app of the service."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_app_secret_unreadable"},"status":{"const":400},"message":{"type":"string","default":"The meetingAppId app's secret cannot be decrypted; register the app again."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_configured"},"status":{"const":400},"message":{"type":"string","default":"No meetingAppId is given and the platform has no app for the service."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include Zoom and Webex meetings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_meeting_app"},"status":{"const":422},"message":{"type":"string","default":"meetingAppId names no meeting app of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/meeting-apps":{"get":{"operationId":"meetingApps.list","summary":"List meeting apps","tags":["Meeting apps"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingAppList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include Zoom and Webex meetings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"meetingApps.create","summary":"Register a meeting app","description":"A sign-in app (zoom_oauth, webex_oauth) is named by meeting connect sessions in place of the platform's; register `redirectUri` at the service. A server app (zoom_s2s, webex_service_app) starts unverified; test it.","tags":["Meeting apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMeetingApp"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingApp"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include Zoom and Webex meetings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_app_exists"},"status":{"const":409},"message":{"type":"string","default":"The tenant already has a server app for the service."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/meeting-apps/{appId}/test":{"post":{"operationId":"meetingApps.test","summary":"Test a meeting server app","description":"Requests a token the way meetings will and, with `user`, looks that address up as a host; the app becomes active or failing.","tags":["Meeting apps"],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","maxLength":320,"format":"email"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingAppTestResult"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_testable"},"status":{"const":400},"message":{"type":"string","default":"The app is a sign-in app, which only account connects use."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include Zoom and Webex meetings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_app_not_found"},"status":{"const":404},"message":{"type":"string","default":"The app does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/meeting-apps/{appId}":{"delete":{"operationId":"meetingApps.delete","summary":"Delete a meeting app","description":"Meetings already created stay at the service. Allowed without the meetings module, so a tenant can remove an app it no longer uses.","tags":["Meeting apps"],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_app_not_found"},"status":{"const":404},"message":{"type":"string","default":"The app does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_app_in_use"},"status":{"const":409},"message":{"type":"string","default":"Account connections were issued through the sign-in app."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/contacts":{"get":{"operationId":"contacts.list","summary":"List or search contacts, by name","description":"Reads the index. q matches part of any name, the organization or any email address, case-insensitively.","tags":["Contacts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"q","in":"query","schema":{"type":"string","minLength":1,"maxLength":200},"allowEmptyValue":true,"allowReserved":true},{"name":"folderId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include contacts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contacts_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's contacts sync is off, or it is an IMAP account without CardDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_contact_folder"},"status":{"const":422},"message":{"type":"string","default":"folderId names no contact folder of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"contacts.create","summary":"Create a contact","description":"Written to the provider, then to the index, so it is listed at once.","tags":["Contacts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid"},"displayName":{"type":"string","minLength":1,"maxLength":256},"givenName":{"type":"string","minLength":1,"maxLength":256},"middleName":{"type":"string","minLength":1,"maxLength":256},"familyName":{"type":"string","minLength":1,"maxLength":256},"nickname":{"type":"string","minLength":1,"maxLength":256},"emails":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/ContactEmailInput"}},"phones":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/ContactPhoneInput"}},"organization":{"type":"string","minLength":1,"maxLength":256},"jobTitle":{"type":"string","minLength":1,"maxLength":256},"department":{"type":"string","minLength":1,"maxLength":256},"birthday":{"type":"string","pattern":"^(\\d{4}|--)-\\d{2}-\\d{2}$"},"notes":{"type":"string","maxLength":10000}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contact_unidentifiable"},"status":{"const":400},"message":{"type":"string","default":"The contact would have no name, organization, email address or phone number."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider cannot store what was given (a folder on Google, or on Microsoft 365 more than 3 email addresses, more than one mobile number or an \"other\" number)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include contacts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks contacts access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact is gone at the provider (the index drops it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contact_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider's answer could not be read back into the index."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contacts_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's contacts sync is off, or it is an IMAP account without CardDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The contact changed at the provider meanwhile."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_contact_folder"},"status":{"const":422},"message":{"type":"string","default":"folderId names no contact folder of the account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/contacts/{contactId}":{"get":{"operationId":"contacts.get","summary":"Get a contact","description":"Reads the index.","tags":["Contacts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"contactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include contacts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contact_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contacts_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's contacts sync is off, or it is an IMAP account without CardDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"contacts.update","summary":"Change a contact","description":"Fields present change (null clears); emails and phones replace the whole list.","tags":["Contacts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"contactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"givenName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"middleName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"familyName":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"nickname":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"emails":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/ContactEmailInput"}},"phones":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/ContactPhoneInput"}},"organization":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"jobTitle":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"department":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"birthday":{"anyOf":[{"type":"string","pattern":"^(\\d{4}|--)-\\d{2}-\\d{2}$"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contact_unidentifiable"},"status":{"const":400},"message":{"type":"string","default":"The contact would have no name, organization, email address or phone number."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The provider cannot store what was given (a folder on Google, or on Microsoft 365 more than 3 email addresses, more than one mobile number or an \"other\" number)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include contacts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks contacts access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contact_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact is gone at the provider (the index drops it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contacts_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's contacts sync is off, or it is an IMAP account without CardDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The contact changed at the provider meanwhile."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"contacts.delete","summary":"Delete a contact","tags":["Contacts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"contactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include contacts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks contacts access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contact_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact is gone at the provider (the index drops it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contacts_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's contacts sync is off, or it is an IMAP account without CardDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The contact changed at the provider meanwhile."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/contacts/{contactId}/photo":{"get":{"operationId":"contacts.photo","summary":"Download a contact's photo","description":"Fetched from the provider on first request and cached until the photo changes.","tags":["Contacts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"contactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The photo as the provider stores it (image/jpeg, image/png, ...)","content":{"image/*":{"schema":{"type":"string","contentMediaType":"image/*"}}},"headers":{"content-disposition":{"description":"Always `inline; filename=\"...\"`","schema":{"type":"string"}},"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider refused the request."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include contacts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused the account access (e.g. the grant lacks contacts access)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contact_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact is gone at the provider (the index drops it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"photo_not_found"},"status":{"const":404},"message":{"type":"string","default":"The contact has no photo."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contacts_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's contacts sync is off, or it is an IMAP account without CardDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_conflict"},"status":{"const":409},"message":{"type":"string","default":"The contact changed at the provider meanwhile."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/contact-folders":{"get":{"operationId":"contactFolders.list","summary":"List contact folders","description":"Microsoft 365 contact folders, the default folder first; empty for Google accounts.","tags":["Contacts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFolderList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include contacts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"contacts_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account's contacts sync is off, or it is an IMAP account without CardDAV settings."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/webhooks":{"get":{"operationId":"webhooks.list","summary":"List webhook endpoints","tags":["Webhooks"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"webhooks.create","summary":"Create a webhook endpoint","description":"The signing secret is returned once.","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpoint"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"https_required"},"status":{"const":400},"message":{"type":"string","default":"url is not https."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mailbox_outside_accounts"},"status":{"const":400},"message":{"type":"string","default":"filters.message.mailboxIds names a mailbox of an account that filters.accountIds leaves out."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_webhooks"},"status":{"const":403},"message":{"type":"string","default":"The tenant already has as many endpoints as its plan allows."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"filters.accountIds names an account the tenant does not have; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_mailbox"},"status":{"const":422},"message":{"type":"string","default":"filters.message.mailboxIds names a mailbox the tenant does not have; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/webhooks/{endpointId}":{"patch":{"operationId":"webhooks.update","summary":"Update a webhook endpoint","description":"The mailbox check runs whenever filters.message.mailboxIds or filters.accountIds changes.","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"filters":{"$ref":"#/components/schemas/WebhookFiltersInput"},"isEnabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"https_required"},"status":{"const":400},"message":{"type":"string","default":"url is not https."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mailbox_outside_accounts"},"status":{"const":400},"message":{"type":"string","default":"filters.message.mailboxIds names a mailbox of an account that filters.accountIds leaves out."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"filters.accountIds names an account the tenant does not have; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_mailbox"},"status":{"const":422},"message":{"type":"string","default":"filters.message.mailboxIds names a mailbox the tenant does not have; data.ids lists them."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"webhooks.delete","summary":"Delete a webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/webhooks/{endpointId}/rotate-secret":{"post":{"operationId":"webhooks.rotateSecret","summary":"Rotate the signing secret","description":"Deliveries are signed with the new secret at once. For graceSeconds (default 86400, at most 604800) they also carry a signature by the old one, in the same webhook-signature header, so receivers can switch secrets without refusing a delivery; 0 stops the old secret at once. A rotation during another's grace ends that grace: only the secret it replaces is kept.","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"graceSeconds":{"type":"integer","minimum":0,"maximum":604800,"default":86400}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecret"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/webhooks/{endpointId}/test":{"post":{"operationId":"webhooks.test","summary":"Send a test event","description":"Queues one event of eventType for delivery to this endpoint only, whatever its filters, signed like any other, with \"isTest\": true in its body; its attempts show in the delivery log. It carries the sample data for its type unless data is given, which must match the type's data. Test events are never in the change feed.","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"eventType":{"$ref":"#/components/schemas/EventType","default":"webhook.test"},"accountId":{"type":"string","format":"uuid"},"data":{"type":"object","additionalProperties":{}}}}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEventSent"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"endpoint_disabled"},"status":{"const":409},"message":{"type":"string","default":"The endpoint is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"accountId names an account the tenant does not have; data.ids lists it."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/webhooks/{endpointId}/attempts":{"get":{"operationId":"webhooks.attempts","summary":"Read the delivery log","description":"Delivery attempts to this endpoint, newest first: of the last 500 within 7 days, those matching the filters. A cursor stays valid while its attempt is in the log.","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"eventType","in":"query","schema":{"$ref":"#/components/schemas/EventType"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"eventId","in":"query","schema":{"$ref":"#/components/schemas/EventId"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"accountId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"result","in":"query","schema":{"$ref":"#/components/schemas/WebhookAttemptResult"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookAttemptPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"until is not after since."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/webhooks/{endpointId}/replay":{"post":{"operationId":"webhooks.replay","summary":"Replay a time range","description":"Queues every event in [since, until) that the endpoint would receive with its current filters again, with the same id and body as the first delivery and a fresh signature. Events the endpoint already has queued are not queued twice. Events past the tenant's eventRetentionDays cannot be replayed.","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time","x-native-type":"date"},"until":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["since","until"]}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayResult"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"until is not after since."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"replay_range_too_large"},"status":{"const":400},"message":{"type":"string","default":"The range holds more than 1000 events."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"endpoint_disabled"},"status":{"const":409},"message":{"type":"string","default":"The endpoint is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/webhooks/{endpointId}/events/{eventId}/replay":{"post":{"operationId":"webhooks.replayEvent","summary":"Replay one event","description":"Queues the event again for this endpoint, whatever its filters, with the same id and body as the first delivery and a fresh signature; not twice if the endpoint already has it queued. Events past the tenant's eventRetentionDays cannot be replayed.","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"eventId","in":"path","required":true,"schema":{"$ref":"#/components/schemas/EventId"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayResult"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"event_not_found"},"status":{"const":404},"message":{"type":"string","default":"The event is unknown or no longer retained."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"endpoint_disabled"},"status":{"const":409},"message":{"type":"string","default":"The endpoint is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/webhooks/{endpointId}/failed-deliveries/count":{"get":{"operationId":"webhooks.countFailed","summary":"Count failed deliveries","description":"How many events replay-failed would queue now: those the endpoint gave up on (retries exhausted, or given up when it was disabled) that are still retained and not queued again, optionally only those created in [since, until).","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"until","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FailedDeliveryCount"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"until is not after since."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/webhooks/{endpointId}/replay-failed":{"post":{"operationId":"webhooks.replayFailed","summary":"Replay failed deliveries","description":"Queues every event the endpoint gave up on again, once each, optionally only those created in [since, until), with the same id and body as the first delivery and a fresh signature. The failed deliveries are replaced by the replays (their attempts stay in the delivery log), so calling again does not send them twice. Events past the tenant's eventRetentionDays cannot be replayed.","tags":["Webhooks"],"parameters":[{"name":"endpointId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time","x-native-type":"date"},"until":{"type":"string","format":"date-time","x-native-type":"date"}}}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayResult"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"until is not after since."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"replay_range_too_large"},"status":{"const":400},"message":{"type":"string","default":"More than 1000 events failed; replay a narrower range."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"webhook_endpoint_not_found"},"status":{"const":404},"message":{"type":"string","default":"The endpoint does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"endpoint_disabled"},"status":{"const":409},"message":{"type":"string","default":"The endpoint is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/changes":{"get":{"operationId":"changes.list","summary":"Read the change feed","description":"Events oldest first. Pass nextCursor back as cursor to continue; it is never null, since the feed has no end, only a present: an empty page means caught up, so poll again from the same cursor later. An API key bound to accounts reads only their events, without the tenant-level ones (accountId null).","tags":["Changes"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"types","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/EventType"}}]},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventFeedPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/settings":{"get":{"operationId":"settings.get","summary":"Get tenant settings","tags":["Settings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettings"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"settings.update","summary":"Update tenant settings","description":"bodyStorage applies to every account without its own override; changing it restarts their syncs (full stores and backfills every indexed message, none deletes stored content).","tags":["Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantSettings"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantSettings"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"bodyStorage is cache or full and no object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"redirect_uri_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A redirect URI is not absolute https (http only for localhost)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_storage"},"status":{"const":403},"message":{"type":"string","default":"bodyStorage is cache or full and the tenant's plan does not include body storage."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/oauth-apps":{"get":{"operationId":"oauthApps.list","summary":"List tenant OAuth apps","tags":["OAuth apps"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAppList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"oauthApps.create","summary":"Register a tenant OAuth app","tags":["OAuth apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOAuthApp"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthApp"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"cloud_required"},"status":{"const":400},"message":{"type":"string","default":"provider is microsoft and no cloud is given."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_microsoft"},"status":{"const":400},"message":{"type":"string","default":"cloud or authority is given for a Google app."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/oauth-apps/{appId}":{"patch":{"operationId":"oauthApps.update","summary":"Change a tenant OAuth app: name, client secret, authority or Gmail push","description":"Accounts on the app use the new secret from their next token refresh. gmailPush (Google apps) makes the app's accounts watch the topic with users.watch instead of being polled; null stops their watches and returns them to polling. Changing it wakes the app's accounts so it applies at once, and saving it again retries a watch Gmail refused.","tags":["OAuth apps"],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"clientSecret":{"type":"string","minLength":1},"authority":{"type":"string","minLength":1},"gmailPush":{"anyOf":[{"$ref":"#/components/schemas/GmailPushSettings"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthApp"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_microsoft"},"status":{"const":400},"message":{"type":"string","default":"authority is given for a Google app."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"gmail_push_unsupported"},"status":{"const":400},"message":{"type":"string","default":"gmailPush is given for a Microsoft app."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"push_unavailable"},"status":{"const":400},"message":{"type":"string","default":"gmailPush is set and the instance has no PUSH_BASE_URL."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_not_found"},"status":{"const":404},"message":{"type":"string","default":"The OAuth app does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"oauthApps.delete","summary":"Delete a tenant OAuth app","tags":["OAuth apps"],"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_not_found"},"status":{"const":404},"message":{"type":"string","default":"The OAuth app does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_in_use"},"status":{"const":409},"message":{"type":"string","default":"Live accounts still use the app."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/connect-sessions":{"post":{"operationId":"connectSessions.create","summary":"Create a hosted connect session","description":"Returns a link to the hosted connect page. Its OAuth sign-ins pass a Continue page on the API origin naming the tenant and provider, and must finish in the browser that pressed Continue (an HttpOnly cookie on the API origin); a callback in any other browser renders an error page and connects nothing. Without redirectUri the owner ends on Workwae's own confirmation page, which needs no allowlist entry; follow the outcome with GET /v1/connect-sessions/{sessionId} or the account.connected event. A failed sign-in returns with status=error and error set to a ConnectErrorCode.","tags":["Connect"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectSession"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionLink"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"redirect_uri_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"redirectUri is not on the tenant allowlist (settings.redirectUris)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_account"},"status":{"const":400},"message":{"type":"string","default":"accountId names an account that authenticates through an organization connection (test the connection to restore it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"shared_mailbox_account"},"status":{"const":400},"message":{"type":"string","default":"accountId names a shared mailbox (reconnect the account that opened it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"options.bodyStorage is cache or full and no object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_mismatch"},"status":{"const":400},"message":{"type":"string","default":"An OAuth app in oauthAppIds is for the other provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"google_imap_requires_own_app"},"status":{"const":400},"message":{"type":"string","default":"providers includes google with options.mailAccess imap (given, or kept by the account being reconnected) and no Google app (oauthAppIds, or the reconnected account's own): Google over IMAP needs the tenant's own Google OAuth app."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"accountId is not given and the tenant's payment is past due beyond the grace period."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_storage"},"status":{"const":403},"message":{"type":"string","default":"options.bodyStorage is cache or full and the tenant's plan does not include body storage."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_mismatch"},"status":{"const":409},"message":{"type":"string","default":"providers leaves out the sign-in the account reconnects with."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_key_limit"},"status":{"const":409},"message":{"type":"string","default":"mcp is given with accountId, and that account already has as many live MCP keys as it may."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"accountId names no live account of the tenant; data.ids names it."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_oauth_app"},"status":{"const":422},"message":{"type":"string","default":"oauthAppIds names no OAuth app of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/connect-sessions/{sessionId}":{"get":{"operationId":"connectSessions.get","summary":"Read a hosted connect session's outcome","tags":["Connect"],"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSession"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"connect_session_not_found"},"status":{"const":404},"message":{"type":"string","default":"No session has this id (or token)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/oauth-authorizations":{"post":{"operationId":"oauthAuthorizations.create","summary":"Start a headless OAuth connect","description":"authorizeUrl is a page on the API origin naming the tenant and the provider; only its Continue button (a form POST, accepted only from the API or console origin) leads on to the provider. Continuing works once and binds the sign-in to that browser with an HttpOnly cookie scoped to the callback; a callback arriving in any other browser renders an error page and connects nothing, so send the user's own browser to it. A failed sign-in returns with status=error and error set to a ConnectErrorCode.","tags":["Connect"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartOAuthRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorization"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"redirect_uri_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"redirectUri is not on the tenant allowlist (settings.redirectUris)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_account"},"status":{"const":400},"message":{"type":"string","default":"accountId names an account that authenticates through an organization connection (test the connection to restore it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"shared_mailbox_account"},"status":{"const":400},"message":{"type":"string","default":"accountId names a shared mailbox (reconnect the account that opened it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"options.bodyStorage is cache or full and no object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_mismatch"},"status":{"const":400},"message":{"type":"string","default":"The OAuth app is for the other provider."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_secret_unreadable"},"status":{"const":400},"message":{"type":"string","default":"The OAuth app's client secret cannot be decrypted; replace it."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_configured"},"status":{"const":400},"message":{"type":"string","default":"No OAuth app is given and the platform has none for the provider (and cloud)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"google_imap_requires_own_app"},"status":{"const":400},"message":{"type":"string","default":"provider google with options.mailAccess imap (given, or kept by the account being reconnected) and no Google app (oauthAppId, or the reconnected account's own): Google over IMAP needs the tenant's own Google OAuth app."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"accountId is not given and the tenant's payment is past due beyond the grace period."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_storage"},"status":{"const":403},"message":{"type":"string","default":"options.bodyStorage is cache or full and the tenant's plan does not include body storage."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include shared mailboxes (options.sharedMailboxesEnabled: true)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_mismatch"},"status":{"const":409},"message":{"type":"string","default":"The account given as accountId signs in with another provider, or with a password."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"accountId names no live account of the tenant; data.ids names it."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_oauth_app"},"status":{"const":422},"message":{"type":"string","default":"oauthAppId names no OAuth app of the tenant."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/org-connections":{"get":{"operationId":"orgConnections.list","summary":"List organization connections","tags":["Organization connections"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgConnectionList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"post":{"operationId":"orgConnections.create","summary":"Register an organization connection","description":"Google: the service account key is checked and sealed; authorize the returned clientId for the returned scopes in the Admin console, then test. Microsoft: a platform connection starts in pending_consent (POST .../consent); a tenant app with a directoryId starts unverified.","tags":["Organization connections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrgConnection"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgConnection"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_service_account_key"},"status":{"const":400},"message":{"type":"string","default":"serviceAccountKey is not a usable Google service account key."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_certificate"},"status":{"const":400},"message":{"type":"string","default":"The certificate or private key is not a usable PEM certificate and unencrypted PKCS#8 RSA key."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"directory_id_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A directoryId is given for a platform connection."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_configured"},"status":{"const":400},"message":{"type":"string","default":"A platform connection names a cloud the platform has no app for."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/org-connections/{connectionId}":{"get":{"operationId":"orgConnections.get","summary":"Get an organization connection","tags":["Organization connections"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgConnection"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_not_found"},"status":{"const":404},"message":{"type":"string","default":"The organization connection does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"patch":{"operationId":"orgConnections.update","summary":"Update an organization connection","description":"Replacing a credential or the authorized scopes makes the connection unverified until the next test.","tags":["Organization connections"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"serviceAccountKey":{"type":"string","minLength":2,"maxLength":20000},"calendarEnabled":{"type":"boolean"},"contactsEnabled":{"type":"boolean"},"directoryAdmin":{"anyOf":[{"type":"string","maxLength":320,"format":"email"},{"type":"null"}]},"clientSecret":{"type":"string","minLength":1,"maxLength":1024},"certificate":{"type":"string","minLength":1,"maxLength":20000},"privateKey":{"type":"string","minLength":1,"maxLength":20000},"directoryId":{"type":"string","minLength":1,"maxLength":100}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgConnection"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_service_account_key"},"status":{"const":400},"message":{"type":"string","default":"serviceAccountKey is not a usable Google service account key."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_certificate"},"status":{"const":400},"message":{"type":"string","default":"The certificate or private key is not a usable PEM certificate and unencrypted PKCS#8 RSA key."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"directory_id_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A directoryId is given for a platform connection."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"credential_mismatch"},"status":{"const":400},"message":{"type":"string","default":"A field does not apply to this connection's kind or credential type, or a certificate is replaced without its private key."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_not_found"},"status":{"const":404},"message":{"type":"string","default":"The organization connection does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"orgConnections.delete","summary":"Delete an organization connection","tags":["Organization connections"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_not_found"},"status":{"const":404},"message":{"type":"string","default":"The organization connection does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"connection_in_use"},"status":{"const":409},"message":{"type":"string","default":"Live accounts still authenticate through the connection."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/org-connections/{connectionId}/consent":{"post":{"operationId":"orgConnections.consent","summary":"Start Microsoft admin consent","description":"Returns the URL an administrator of the directory grants consent at. Afterwards the browser returns to redirectUri with status=success|error, connection_id, error and state; the connection records the consenting directory and is tested. A tenant app uses /adminconsent. The platform app is consented through a sign-in (authorize with prompt=admin_consent) and records the directory named by the sign-in's ID token; it can only be started from the console, and the console user who started it has to be signed in, in the browser that returns, for the directory to be recorded. Errors on return include access_denied, consent_failed, consent_unverified, directory_mismatch and directory_already_connected (another platform connection holds the directory).","tags":["Organization connections"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"redirectUri":{"type":"string","format":"uri"},"state":{"type":"string","maxLength":1024}},"required":["redirectUri"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentLink"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_microsoft"},"status":{"const":400},"message":{"type":"string","default":"The connection is a Google connection."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"redirect_uri_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"redirectUri is neither on the tenant allowlist (settings.redirectUris) nor the console."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_configured"},"status":{"const":400},"message":{"type":"string","default":"A platform connection's cloud has no platform app (the platform's configuration changed)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"session_required"},"status":{"const":403},"message":{"type":"string","default":"A platform connection's consent is started by a caller that is not a console session."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_not_found"},"status":{"const":404},"message":{"type":"string","default":"The organization connection does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/org-connections/{connectionId}/test":{"post":{"operationId":"orgConnections.test","summary":"Test an organization connection","description":"Requests a token the way accounts will and reports each check; the connection becomes active or failing. A passing test returns accounts that were moved to reauth_required to active. Google impersonates `user` (default: the directory admin).","tags":["Organization connections"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"string","maxLength":320,"format":"email"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgConnectionTestResult"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"user_required"},"status":{"const":400},"message":{"type":"string","default":"A Google connection has neither a user nor a directory admin to test as."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_not_found"},"status":{"const":404},"message":{"type":"string","default":"The organization connection does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"consent_required"},"status":{"const":409},"message":{"type":"string","default":"No Microsoft directory has consented to the app yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/org-connections/{connectionId}/directory-entries":{"get":{"operationId":"orgConnections.directoryEntries","summary":"List the directory's mailboxes","description":"Microsoft: Graph /users (needs User.Read.All). Google: the Admin SDK users.list as the directory admin (needs admin.directory.user.readonly). `query` matches the start of names and addresses. A nextCursor is good for an hour, on this connection only.","tags":["Organization connections"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"allowEmptyValue":true,"allowReserved":true},{"name":"query","in":"query","schema":{"type":"string","maxLength":100},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectoryEntryPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_rejected"},"status":{"const":400},"message":{"type":"string","default":"The provider rejected the listing (e.g. the query)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_not_found"},"status":{"const":404},"message":{"type":"string","default":"The organization connection does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the directory."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"consent_required"},"status":{"const":409},"message":{"type":"string","default":"No Microsoft directory has consented to the app yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"directory_unavailable"},"status":{"const":409},"message":{"type":"string","default":"The connection may not list the directory: there is no directory admin, the permission or scope is not granted, or the connection cannot get a token (test it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/org-connections/{connectionId}/accounts":{"post":{"operationId":"orgConnections.addAccounts","summary":"Add mailboxes as accounts","description":"Each mailbox is checked through the connection before its account is created (Google: a delegated token for it; Microsoft: its inbox). items holds one result per mailbox, in request order. Per-mailbox failures are reported there with the reason the API would answer with, e.g. invalid_grant (no such user), consent_revoked (the scopes or permissions are not granted), provider_forbidden or provider_not_found (no mailbox access), plan_limit_accounts (the plan's account limit was reached part way through; the mailboxes before it are created).","tags":["Organization connections"],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mailboxes":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/AddMailboxInput"}},"settings":{"$ref":"#/components/schemas/SettingsOverride"}},"required":["mailboxes"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddedMailboxList"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"settings.bodyStorage is cache or full and no object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_storage"},"status":{"const":403},"message":{"type":"string","default":"settings.bodyStorage is cache or full and the tenant's plan does not include body storage."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"org_connection_not_found"},"status":{"const":404},"message":{"type":"string","default":"The organization connection does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"consent_required"},"status":{"const":409},"message":{"type":"string","default":"No Microsoft directory has consented to the app yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/accounts/{accountId}/shared-mailboxes":{"post":{"operationId":"sharedMailboxes.create","summary":"Open a shared mailbox with an account's grant","description":"Creates (or re-points) an account for a shared mailbox the delegating account's user can access, authenticated with that account's grant: Graph addresses it as /users/{email}; an Exchange IMAP account logs in as user\\shared with XOAUTH2. Gmail has no delegated shared mailboxes: add them through a Google domain-wide delegation connection.","tags":["Shared mailboxes"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"displayName":{"type":"string","maxLength":255},"externalRef":{"type":"string","maxLength":255},"settings":{"$ref":"#/components/schemas/SettingsOverride"}},"required":["email"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"settings.bodyStorage is cache or full and no object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"shared_mailbox_unsupported"},"status":{"const":400},"message":{"type":"string","default":"The delegating account is Gmail, password IMAP, or itself shared or organization-authenticated, or the mailbox is its own."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"scope_missing"},"status":{"const":400},"message":{"type":"string","default":"The delegating account's grant lacks the shared mailbox scope (reconnect it with options.sharedMailboxesEnabled)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include shared mailboxes."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_storage"},"status":{"const":403},"message":{"type":"string","default":"settings.bodyStorage is cache or full and the tenant's plan does not include body storage."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_accounts"},"status":{"const":403},"message":{"type":"string","default":"The tenant already has as many accounts as its plan allows."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The delegating account does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The delegating account is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The delegating account is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The delegating account must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The delegating account's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_exists"},"status":{"const":409},"message":{"type":"string","default":"The mailbox is already an account authenticated another way."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"shared_mailbox_inaccessible"},"status":{"const":422},"message":{"type":"string","default":"The delegating account's user cannot open the mailbox (no access, no such mailbox, or the login is refused)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/imap-accounts":{"post":{"operationId":"imapAccounts.create","summary":"Connect an IMAP/SMTP account with a password","description":"The login is checked before anything is stored, for DAV too. Giving dav switches settings.calendarEnabled and contactsEnabled on for the halves found unless settings names them.","tags":["Accounts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateImapAccount"}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"login_failed"},"status":{"const":400},"message":{"type":"string","default":"A server (IMAP, SMTP, CalDAV or CardDAV) refuses the login."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"server_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A server resolves to a private or loopback address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plaintext_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A server is named with security none (a plaintext login)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"dav_discovery_failed"},"status":{"const":400},"message":{"type":"string","default":"Neither a CalDAV nor a CardDAV server was found or answered."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_dav_server"},"status":{"const":400},"message":{"type":"string","default":"A named CalDAV or CardDAV URL is no DAV server (it answers 404, 403, or not as one)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"settings.bodyStorage is cache or full and no object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"402":{"description":"402","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"billing_past_due"},"status":{"const":402},"message":{"type":"string","default":"The tenant's payment is past due beyond the grace period (sends already queued or scheduled still go out)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_storage"},"status":{"const":403},"message":{"type":"string","default":"settings.bodyStorage is cache or full and the tenant's plan does not include body storage."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_limit_accounts"},"status":{"const":403},"message":{"type":"string","default":"The tenant already has as many accounts as its plan allows."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"autodiscovery_failed"},"status":{"const":422},"message":{"type":"string","default":"imap was left out and autodiscovery found no IMAP server for the address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/accounts/{accountId}/imap-settings":{"patch":{"operationId":"imapSettings.update","summary":"Change an IMAP account's servers or password","description":"Present fields replace the stored ones and the result is checked like a new account. An account in reauth_required becomes active again. A stored password is never sent to a new server or tried for another login: changing the IMAP server (host, port, security or user) needs password in the same request, changing the SMTP server (host, port, security or user) needs smtpPassword (or password when SMTP uses the IMAP password), switching SMTP from its own password to the IMAP one (smtpPassword: null) needs password, and adding DAV settings or changing their URLs, user or password source needs the password DAV logs in with (dav.password, or password when DAV uses the IMAP password). Sending dav: null removes the calendar and contacts; a CalDAV or CardDAV half the account did not have before switches settings.calendarEnabled or contactsEnabled on, unless the account's settings already name that key (an earlier opt-out stays); dav fields left out keep their stored values, or are discovered for an account without DAV settings. An account that signs in with OAuth always uses its provider's servers.","tags":["Accounts"],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":1024},"smtpPassword":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024},{"type":"null"}]},"imap":{"$ref":"#/components/schemas/MailServerInput"},"smtp":{"anyOf":[{"$ref":"#/components/schemas/MailServerInput"},{"type":"null"}]},"appendSent":{"type":"boolean"},"dav":{"anyOf":[{"$ref":"#/components/schemas/DavInput"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"login_failed"},"status":{"const":400},"message":{"type":"string","default":"A server (IMAP, SMTP, CalDAV or CardDAV) refuses the login."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"server_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A server resolves to a private or loopback address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plaintext_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A server is named with security none (a plaintext login)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"dav_discovery_failed"},"status":{"const":400},"message":{"type":"string","default":"Neither a CalDAV nor a CardDAV server was found or answered."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_dav_server"},"status":{"const":400},"message":{"type":"string","default":"A named CalDAV or CardDAV URL is no DAV server (it answers 404, 403, or not as one)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_imap_account"},"status":{"const":400},"message":{"type":"string","default":"The account reads mail through a provider's API, not IMAP."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"password_required"},"status":{"const":400},"message":{"type":"string","default":"A server, login user or password source changes without its password."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"password_not_stored"},"status":{"const":400},"message":{"type":"string","default":"The account has no stored password and none is sent."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"dav_unsupported"},"status":{"const":400},"message":{"type":"string","default":"dav is given for an account that signs in with OAuth."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_servers_fixed"},"status":{"const":400},"message":{"type":"string","default":"The servers of an account that signs in with OAuth are changed."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"password_unsupported"},"status":{"const":400},"message":{"type":"string","default":"A password is sent for an account that signs in with OAuth."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"credential_missing"},"status":{"const":400},"message":{"type":"string","default":"The OAuth account has no stored credential."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"credential_conflict"},"status":{"const":400},"message":{"type":"string","default":"The OAuth account's credential kept changing while it was refreshed."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_client"},"status":{"const":400},"message":{"type":"string","default":"The provider refuses the OAuth account's client credentials."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"token_exchange_failed"},"status":{"const":400},"message":{"type":"string","default":"The provider's token endpoint refuses the OAuth account's refresh."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_configured"},"status":{"const":400},"message":{"type":"string","default":"The platform OAuth app the account signed in with is gone."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"oauth_app_secret_unreadable"},"status":{"const":400},"message":{"type":"string","default":"The client secret of the account's OAuth app cannot be decrypted; replace it."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account does not exist, or the caller is an account token for another account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The OAuth account's stored grant no longer works, so its servers cannot be checked."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/autoconfig":{"get":{"operationId":"autoconfig.lookup","summary":"Find IMAP, SMTP and DAV settings for an address","description":"dav carries CalDAV and CardDAV context URLs when a source names them; they need the login to resolve to the account's home sets, which creating the account does.","tags":["Accounts"],"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","maxLength":320,"format":"email"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveredSettings"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"autodiscovery_failed"},"status":{"const":422},"message":{"type":"string","default":"No IMAP settings were found for the address; ask the user for the servers then."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/hosted/connect-sessions/{token}":{"get":{"operationId":"hostedConnectSessions.get","summary":"Read a hosted connect session","tags":["Hosted pages"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectSessionPublic"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"connect_session_not_found"},"status":{"const":404},"message":{"type":"string","default":"No session has this id (or token)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"security":[]}},"/v1/hosted/connect-sessions/{token}/imap-accounts":{"post":{"operationId":"hostedConnectSessions.createImapAccount","summary":"Connect an IMAP account from the hosted page","description":"When the tenant's plan allows no more accounts, or its payment is past due beyond the grace period, the session fails and redirectUrl carries status=error&error=plan_limit_accounts (or billing_past_due), as the OAuth callback does. Giving dav switches settings.calendarEnabled and contactsEnabled on for the halves found unless the session's options name them, as POST /v1/imap-accounts does. A reconnect session replaces the password only: the account keeps its stored servers and DAV settings, and any sent here are ignored. Its DAV login is checked again: with the new password when DAV uses the IMAP password, otherwise with dav.password when given (which then replaces the stored DAV password) or the stored one.","tags":["Hosted pages"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"displayName":{"type":"string","maxLength":255},"password":{"type":"string","minLength":1,"maxLength":1024},"smtpPassword":{"type":"string","minLength":1,"maxLength":1024},"imap":{"$ref":"#/components/schemas/MailServerInput"},"smtp":{"anyOf":[{"$ref":"#/components/schemas/MailServerInput"},{"type":"null"}]},"appendSent":{"type":"boolean"},"dav":{"$ref":"#/components/schemas/DavInput"}},"required":["email","password"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedImapResult"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"session_expired"},"status":{"const":400},"message":{"type":"string","default":"The session is past expiresAt."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"redirect_uri_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"The session's return address is no longer on the tenant allowlist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"The session does not offer the IMAP form."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"login_failed"},"status":{"const":400},"message":{"type":"string","default":"A server (IMAP, SMTP, CalDAV or CardDAV) refuses the login."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"server_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A server resolves to a private or loopback address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plaintext_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"A server is named with security none (a plaintext login)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"dav_discovery_failed"},"status":{"const":400},"message":{"type":"string","default":"Neither a CalDAV nor a CardDAV server was found or answered."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"not_dav_server"},"status":{"const":400},"message":{"type":"string","default":"A named CalDAV or CardDAV URL is no DAV server (it answers 404, 403, or not as one)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"password_required"},"status":{"const":400},"message":{"type":"string","default":"A reconnect session's DAV has a password of its own, none is stored and dav.password is left out."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"connect_session_not_found"},"status":{"const":404},"message":{"type":"string","default":"No session has this id (or token)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_not_found"},"status":{"const":404},"message":{"type":"string","default":"The account a reconnect session was created for was deleted."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"session_used"},"status":{"const":409},"message":{"type":"string","default":"The session already completed or failed."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_exists"},"status":{"const":409},"message":{"type":"string","default":"The tenant already has a live IMAP account with this address and the session was not created to reconnect it (accountId)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_mismatch"},"status":{"const":409},"message":{"type":"string","default":"A reconnect session's account has another address, or is not an IMAP account."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"autodiscovery_failed"},"status":{"const":422},"message":{"type":"string","default":"imap was left out and autodiscovery found no IMAP server for the address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"security":[]}},"/v1/hosted/connect-sessions/{token}/autoconfig":{"get":{"operationId":"hostedConnectSessions.autoconfig","summary":"Find IMAP and SMTP settings from the hosted page","tags":["Hosted pages"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"email","in":"query","required":true,"schema":{"type":"string","maxLength":320,"format":"email"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveredSettings"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"session_expired"},"status":{"const":400},"message":{"type":"string","default":"The session is past expiresAt."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"redirect_uri_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"The session's return address is no longer on the tenant allowlist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_allowed"},"status":{"const":400},"message":{"type":"string","default":"The session does not offer the IMAP form."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"connect_session_not_found"},"status":{"const":404},"message":{"type":"string","default":"No session has this id (or token)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"session_used"},"status":{"const":409},"message":{"type":"string","default":"The session already completed or failed."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"autodiscovery_failed"},"status":{"const":422},"message":{"type":"string","default":"No IMAP settings were found for the address."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"security":[]}},"/v1/hosted/meeting-connect-sessions/{token}":{"get":{"operationId":"hostedMeetingConnectSessions.get","summary":"Read a hosted meeting connect session","tags":["Hosted pages"],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingConnectSessionPublic"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"meeting_connect_session_not_found"},"status":{"const":404},"message":{"type":"string","default":"No session has this token, or its account no longer exists."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"security":[]}},"/v1/exports":{"post":{"operationId":"exports.create","summary":"Export the tenant or one account","description":"Builds a gzip-compressed tar in the background: accounts without secrets, mailboxes, message metadata (JSON lines), stored message bodies as .eml, calendars and events as JSON and .ics, and for a tenant export its webhooks (without signing secrets), templates and settings. Follow it with GET /v1/exports/{exportId}, or the export.completed and export.failed events. Requires the admin scope.","tags":["Exports"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataExport"}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"No object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_in_progress"},"status":{"const":409},"message":{"type":"string","default":"An export of the same scope (the tenant, or the same account) is queued or running."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"accountId names an account the tenant does not have; data.ids lists it."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]},"get":{"operationId":"exports.list","summary":"List exports, newest first","description":"Requires the admin scope.","tags":["Exports"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExportPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/exports/{exportId}":{"get":{"operationId":"exports.get","summary":"Get an export","description":"Requires the admin scope.","tags":["Exports"],"parameters":[{"name":"exportId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_not_found"},"status":{"const":404},"message":{"type":"string","default":"The export does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}},"delete":{"operationId":"exports.delete","summary":"Delete an export and its file","description":"Requires the admin scope.","tags":["Exports"],"parameters":[{"name":"exportId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"not":{}},{"not":{}}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_not_found"},"status":{"const":404},"message":{"type":"string","default":"The export does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_running"},"status":{"const":409},"message":{"type":"string","default":"The export is being built."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/exports/{exportId}/download":{"get":{"operationId":"exports.download","summary":"Download an export (application/gzip)","description":"Streams the decrypted .tar.gz; compare it with the export's sha256. Requires the admin scope.","tags":["Exports"],"parameters":[{"name":"exportId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The export as a gzip-compressed tar","content":{"application/gzip":{"schema":{"type":"string","contentMediaType":"application/gzip"}}},"headers":{"content-disposition":{"description":"Always `attachment; filename=\"...\"`","schema":{"type":"string"}},"x-export-sha256":{"description":"sha256 hex of the body, the export's sha256","schema":{"type":"string"}},"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"storage_unavailable"},"status":{"const":400},"message":{"type":"string","default":"No object store is configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_not_found"},"status":{"const":404},"message":{"type":"string","default":"The export does not exist."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_not_ready"},"status":{"const":409},"message":{"type":"string","default":"The export is queued or running."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_failed"},"status":{"const":409},"message":{"type":"string","default":"The export failed."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"410":{"description":"410","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_expired"},"status":{"const":410},"message":{"type":"string","default":"The export's file was deleted."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"export_corrupt"},"status":{"const":500},"message":{"type":"string","default":"A stored part of the export fails its integrity check."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/usage":{"get":{"operationId":"usage.get","summary":"Read usage and plan limits","description":"Per UTC day: live accounts (sampled), API calls by scope, sends, webhook deliveries, AI calls and stored bytes (listed once a day). from and to default to the last 30 days; today's counters are live.","tags":["Usage"],"parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"from is after to (or after today, with to left out), or the range spans more than 366 days."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}},"/v1/ai/draft":{"post":{"operationId":"ai.draft","summary":"Draft email text with AI","description":"Writes an email body from instructions, optionally answering a message or reworking a draft, in plain text or Markdown. Nothing is sent or saved: the text is for a person to edit. Needs the write scope; the tenant may ask for AI_DRAFTS_PER_MINUTE drafts a minute (beyond that, rate_limited with Retry-After).","tags":["AI"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAiDraft"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiDraft"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"ai_disabled"},"status":{"const":400},"message":{"type":"string","default":"The deployment has no AI gateway configured."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"ai_refused"},"status":{"const":400},"message":{"type":"string","default":"The model declines the instructions."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"plan_module_unavailable"},"status":{"const":403},"message":{"type":"string","default":"The tenant's plan does not include AI."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The provider refused to read the message being answered."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_not_found"},"status":{"const":404},"message":{"type":"string","default":"The provider no longer has the message being answered."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_paused"},"status":{"const":409},"message":{"type":"string","default":"The account of the message being answered is paused."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_disabled"},"status":{"const":409},"message":{"type":"string","default":"The account of the message being answered is disabled."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_reauth_required"},"status":{"const":409},"message":{"type":"string","default":"The account of the message being answered must be reconnected: its stored grant or login no longer works."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_misconfigured"},"status":{"const":409},"message":{"type":"string","default":"The account of the message being answered's stored grant cannot be used until an administrator fixes what it relies on (the tenant's OAuth app or organization connection is refused, missing or unreadable)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_account"},"status":{"const":422},"message":{"type":"string","default":"context.accountId names an account the tenant does not have; data.ids lists it."},"data":{"$ref":"#/components/schemas/UnknownIdsData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unknown_message"},"status":{"const":422},"message":{"type":"string","default":"context.replyToMessageId names a message the account does not have."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_throttled"},"status":{"const":429},"message":{"type":"string","default":"The provider asked us to slow down (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"502":{"description":"502","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"provider_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The provider could not be reached (with Retry-After when it named a wait)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"ai_unavailable"},"status":{"const":502},"message":{"type":"string","default":"The AI gateway fails or does not answer in time."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"ai_suspended"},"status":{"const":502},"message":{"type":"string","default":"The AI gateway refuses the deployment's key or account, until an operator fixes it."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes the request safe to retry: the first answer to the key is kept for 24 hours and answered again to the same request.","schema":{"type":"string","minLength":1,"maxLength":255}}]}},"/v1/audit-log":{"get":{"operationId":"auditLog.list","summary":"Read the audit log","description":"Every mutating request on /v1 and from the console, newest first. Needs the admin scope. action matches exactly, or as a prefix when it ends with a dot (accounts.). outcome success is a 2xx status.","tags":["Audit log"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"actorType","in":"query","schema":{"$ref":"#/components/schemas/AuditActorType"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"actorId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"action","in":"query","schema":{"type":"string","minLength":1,"maxLength":200},"allowEmptyValue":true,"allowReserved":true},{"name":"accountId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"outcome","in":"query","schema":{"$ref":"#/components/schemas/AuditOutcome"},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","format":"date-time","x-native-type":"date"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEntryPage"}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_input"},"status":{"const":400},"message":{"type":"string","default":"The request does not match the operation's input schema (a malformed body included); data.issues names each problem."},"data":{"$ref":"#/components/schemas/InvalidInputData"}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_idempotency_key"},"status":{"const":400},"message":{"type":"string","default":"POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_cursor"},"status":{"const":400},"message":{"type":"string","default":"The cursor is not one this list issued."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"invalid_range"},"status":{"const":400},"message":{"type":"string","default":"to is before from."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"unauthenticated"},"status":{"const":401},"message":{"type":"string","default":"No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"api_key_expired"},"status":{"const":401},"message":{"type":"string","default":"The API key is past its expiry (or the grace of the rotation that replaced it)."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"missing_scope"},"status":{"const":403},"message":{"type":"string","default":"The API key lacks the scope the operation needs."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"role_forbidden"},"status":{"const":403},"message":{"type":"string","default":"The member's role does not allow the operation."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_token_forbidden"},"status":{"const":403},"message":{"type":"string","default":"An account token called an operation account tokens cannot call."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"account_scope_forbidden"},"status":{"const":403},"message":{"type":"string","default":"A credential limited to specific accounts called an operation that reaches beyond them."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"mcp_only_key"},"status":{"const":403},"message":{"type":"string","default":"An MCP-only key (minted for an end user's MCP client) was used outside the MCP server."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_in_progress"},"status":{"const":409},"message":{"type":"string","default":"POST only: the request first sent with this Idempotency-Key has not been answered yet."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"413":{"description":"413","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"payload_too_large"},"status":{"const":413},"message":{"type":"string","default":"The request body is larger than the API accepts."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"idempotency_key_reused"},"status":{"const":422},"message":{"type":"string","default":"POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"429":{"description":"429","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"rate_limited"},"status":{"const":429},"message":{"type":"string","default":"The tenant used up its plan's request rate; Retry-After says when the window ends."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":true},"code":{"const":"too_many_requests"},"status":{"const":429},"message":{"type":"string","default":"The credential has too many requests in flight at once; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"500":{"description":"500","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"internal_error"},"status":{"const":500},"message":{"type":"string","default":"An unexpected failure on our side."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}},"503":{"description":"503","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"overloaded"},"status":{"const":503},"message":{"type":"string","default":"The API is shedding load; retry after Retry-After."},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}},"headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"}}}}}}}}