{"openapi":"3.1.0","info":{"title":"Inboxes","version":"0.2.41"},"paths":{"/v1/inboxes":{"post":{"tags":["inboxes"],"summary":"Create Inbox","operationId":"create_inbox_v1_inboxes_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxOut"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = quota_exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]},"get":{"tags":["inboxes"],"summary":"List Inboxes","operationId":"list_inboxes_v1_inboxes_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"description":"Only the inbox with this email address (or its local part). Returns at most one item, or none.","title":"Address"},"description":"Only the inbox with this email address (or its local part). Returns at most one item, or none."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InboxOut_"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = workspace_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]}},"/v1/inboxes/{inbox_id}":{"get":{"tags":["inboxes"],"summary":"Read Inbox","operationId":"read_inbox_v1_inboxes__inbox_id__get","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxOut"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = workspace_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]},"patch":{"tags":["inboxes"],"summary":"Patch Inbox","operationId":"patch_inbox_v1_inboxes__inbox_id__patch","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxOut"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = not_entitled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]},"delete":{"tags":["inboxes"],"summary":"Delete Inbox","operationId":"delete_inbox_v1_inboxes__inbox_id__delete","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_found","payload_too_large","rate_limited","unauthorized","unprocessable_event","validation_error"]}},"/v1/inboxes/{inbox_id}/messages":{"get":{"tags":["messages"],"summary":"List Messages","description":"One inbox's messages, newest first. Poll with `since` set to the newest `received_at`\nalready seen; walk back with `until`. A search (`q`, or a `header`) continues with `until` set\nto the page's `next_until`; its `offset` skips messages before it reads.","operationId":"list_messages_v1_inboxes__inbox_id__messages_get","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Only messages containing this text, ignoring case, in the subject, the sender, a header (as `name: value`) or the body; `in` and `header` narrow where. A search reads at most 16 MiB of messages per call, newest first: when it stops before the oldest, `next_until` is set and `next_offset` is not.","title":"Q"},"description":"Only messages containing this text, ignoring case, in the subject, the sender, a header (as `name: value`) or the body; `in` and `header` narrow where. A search reads at most 16 MiB of messages per call, newest first: when it stops before the oldest, `next_until` is set and `next_offset` is not."},{"name":"in","in":"query","required":false,"schema":{"enum":["all","subject","from","headers","body"],"type":"string","description":"Where `q` looks: `all`, or only `subject`, `from` (the sender, as the From header reads), `headers` (each as `name: value`) or `body` (the text body; for an HTML-only email, the text of its HTML).","default":"all","title":"In"},"description":"Where `q` looks: `all`, or only `subject`, `from` (the sender, as the From header reads), `headers` (each as `name: value`) or `body` (the text body; for an HTML-only email, the text of its HTML)."},{"name":"header","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,200}$"},{"type":"null"}],"description":"Only this header's values, its name ignoring case; any of them when it arrived more than once. Without `q`, the messages that carry it at all.","title":"Header"},"description":"Only this header's values, its name ignoring case; any of them when it arrived more than once. Without `q`, the messages that carry it at all."},{"name":"extract","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(otp|links|all)$"},{"type":"null"}],"title":"Extract"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagePage"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = not_entitled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]},"delete":{"tags":["messages"],"summary":"Empty Inbox","operationId":"empty_inbox_v1_inboxes__inbox_id__messages_delete","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyResult"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_found","payload_too_large","rate_limited","unauthorized","unprocessable_event","validation_error"]}},"/v1/messages":{"get":{"tags":["messages"],"summary":"List All Messages","description":"Every message in the workspace, newest first, across every one of its addresses.\n\nWHAT THIS IS FOR. Until now the only way to see what had arrived ANYWHERE was to walk the\naddresses one at a time — the console showed one inbox and you switched between them. Asking\nthe question by fanning out over the per-inbox route is not an option and never was: at Pro's\n25 addresses on the console's 3s poll it is 500 requests a minute from a single tab, the same\narithmetic that already forced arrival counts to be aggregated server-side for the addresses\nlist rather than derived per row.\n\nNOT A REPLACEMENT FOR THE PER-INBOX ROUTE. That one stays the way to read ONE address, and it\nis what a CI poller should use — narrower, cheaper, and it 404s when its address is gone, which\nis the signal a script wants. This is the human question (\"what has arrived\") rather than the\nmachine one (\"did the mail I am waiting for land yet\").\n\nTHE GATE IS THE CREDENTIAL, NOT THE ROUTE — `require_read_api`, exactly as its sibling does it.\nA browser session reads on every plan including free; only a minted API key is charged for\nprogrammatic access. Gating the route instead is how the read API shipped the first time, and\nit made free unusable in a way no test caught: the dashboard necessarily calls the same\nendpoint a script does, so mail arrived, parsed, stored, and could be looked at by nobody.\n\nEach row carries its own `inbox_id` already, so nothing new goes on the wire — a client joins\nthe address string from the inbox list it has loaded anyway rather than having it denormalised\nonto every message, which would be a second copy of a value that can be renamed.\n\nA search (`q`, or a `header`) reads the same stream and continues with `until` set to the\npage's `next_until`, exactly as on the per-inbox route.","operationId":"list_all_messages_v1_messages_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Only messages containing this text, ignoring case, in the subject, the sender, a header (as `name: value`) or the body; `in` and `header` narrow where. A search reads at most 16 MiB of messages per call, newest first: when it stops before the oldest, `next_until` is set and `next_offset` is not.","title":"Q"},"description":"Only messages containing this text, ignoring case, in the subject, the sender, a header (as `name: value`) or the body; `in` and `header` narrow where. A search reads at most 16 MiB of messages per call, newest first: when it stops before the oldest, `next_until` is set and `next_offset` is not."},{"name":"in","in":"query","required":false,"schema":{"enum":["all","subject","from","headers","body"],"type":"string","description":"Where `q` looks: `all`, or only `subject`, `from` (the sender, as the From header reads), `headers` (each as `name: value`) or `body` (the text body; for an HTML-only email, the text of its HTML).","default":"all","title":"In"},"description":"Where `q` looks: `all`, or only `subject`, `from` (the sender, as the From header reads), `headers` (each as `name: value`) or `body` (the text body; for an HTML-only email, the text of its HTML)."},{"name":"header","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[!#$%&'*+.^_`|~0-9A-Za-z-]{1,200}$"},{"type":"null"}],"description":"Only this header's values, its name ignoring case; any of them when it arrived more than once. Without `q`, the messages that carry it at all.","title":"Header"},"description":"Only this header's values, its name ignoring case; any of them when it arrived more than once. Without `q`, the messages that carry it at all."},{"name":"extract","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(otp|links|all)$"},{"type":"null"}],"title":"Extract"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagePage"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = not_entitled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]}},"/v1/inboxes/{inbox_id}/messages/{message_id}":{"get":{"tags":["messages"],"summary":"Read Message","operationId":"read_message_v1_inboxes__inbox_id__messages__message_id__get","parameters":[{"name":"inbox_id","in":"path","required":true,"schema":{"type":"string","title":"Inbox Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"extract","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(otp|links|all)$"},{"type":"null"}],"title":"Extract"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDetailOut"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = not_entitled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]}},"/v1/plan":{"get":{"tags":["account"],"summary":"Read Plan","operationId":"read_plan_v1_plan_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = workspace_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]}},"/v1/usage":{"get":{"tags":["account"],"summary":"Read Usage","operationId":"read_usage_v1_usage_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageOut"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = workspace_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]}},"/v1/audit":{"get":{"tags":["account"],"summary":"List Audit","description":"The workspace's control-plane history, newest first, narrowable by time.\n\nTHE WINDOW IS NOT A CONVENIENCE HERE. This route had no filter of any kind, and nothing ever\ndeletes an AuditLog row — `retention.py` purges messages and released inboxes and leaves the log\nalone, on purpose, because a compliance trail that expires is not one. So the only way to reach\nan entry from six months ago was to page `offset` through every mutation since, and the log only\ngrows. `since`/`until` is the door: an admin names the window they are investigating and reads\nit from the front.\n\nSame strict-`since` / inclusive-`until` pair as the message routes, and for the same reasons —\nsee `service.messages_query`. The statement lives in `service.audit_query` rather than here so\nthat the UTC normalisation those bounds depend on has exactly one spelling in this service.","operationId":"list_audit_v1_audit_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"X-CSRF","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Csrf"}},{"name":"nn_apps_access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nn Apps Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AuditOut_"}}}},"401":{"description":"error.code = unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"402":{"description":"error.code = workspace_suspended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"error.code = forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"error.code = not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"error.code = conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"error.code = payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"error.code = validation_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"error.code = rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"error.code = internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-error-codes":["conflict","forbidden","internal_error","invalid_credential","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]}}},"components":{"schemas":{"AttachmentOut":{"properties":{"id":{"type":"string","title":"Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"sha256":{"type":"string","title":"Sha256"},"stored":{"type":"boolean","title":"Stored"}},"type":"object","required":["id","filename","content_type","size_bytes","sha256","stored"],"title":"AttachmentOut"},"AuditOut":{"properties":{"id":{"type":"string","title":"Id"},"actor":{"type":"string","title":"Actor"},"action":{"type":"string","title":"Action"},"target":{"type":"string","title":"Target"},"detail":{"type":"string","title":"Detail"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","actor","action","target","detail","created_at"],"title":"AuditOut"},"AuthVerdicts":{"properties":{"spf":{"type":"string","title":"Spf"},"dkim":{"type":"string","title":"Dkim"},"dmarc":{"type":"string","title":"Dmarc"}},"type":"object","required":["spf","dkim","dmarc"],"title":"AuthVerdicts"},"EmptyResult":{"properties":{"deleted":{"type":"integer","title":"Deleted"}},"type":"object","required":["deleted"],"title":"EmptyResult","description":"How many messages a bulk delete removed. A named model so the one route that reports a\ncount is described in the schema like every other response, rather than as a loose mapping."},"ErrorDetail":{"description":"The `error` object: what went wrong.","properties":{"code":{"description":"Stable machine-readable reason. Clients branch on this.","title":"Code","type":"string","x-known-values":["bad_envelope","bad_request","conflict","error","forbidden","internal","internal_error","invalid_credential","invalid_request","method_not_allowed","not_entitled","not_found","payload_too_large","plan_violation","quota_exceeded","rate_limited","unauthorized","unavailable","unparseable_message","unprocessable","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]},"message":{"description":"Human-readable explanation. Never branch on it.","title":"Message","type":"string"},"details":{"anyOf":[{},{"type":"null"}],"default":null,"description":"Optional structured detail; its shape is fixed per code, not globally.","title":"Details"},"request_id":{"type":"string","description":"The request's X-Request-ID. Quote it to support; never branch on it."},"next_code":{"type":"string","description":"Present only while this error is moving to a different code: the code it will be sent with once the move is complete. When present, branch on this rather than on `code`.","x-known-values":["bad_envelope","bad_request","conflict","forbidden","internal_error","invalid_credential","method_not_allowed","not_entitled","not_found","payload_too_large","quota_exceeded","rate_limited","unauthorized","unavailable","unparseable_message","unprocessable_event","validation_error","workspace_frozen","workspace_suspended"]}},"required":["code","message"],"title":"ErrorDetail","type":"object"},"ErrorEnvelope":{"description":"The body of every error response: an `error` object that says what went wrong.","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"required":["error"],"title":"ErrorEnvelope","type":"object"},"Extracted":{"properties":{"otp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Otp"},"otp_source":{"anyOf":[{"type":"string","enum":["subject","text","html"]},{"type":"null"}],"title":"Otp Source"},"links":{"items":{"type":"string"},"type":"array","title":"Links","default":[]},"links_by_part":{"anyOf":[{"$ref":"#/components/schemas/LinksByPart"},{"type":"null"}]}},"type":"object","title":"Extracted"},"HeaderOut":{"properties":{"name":{"type":"string","title":"Name"},"value":{"type":"string","title":"Value"}},"type":"object","required":["name","value"],"title":"HeaderOut","description":"One header line, bind's shape: the name as sent, the value unfolded and decoded."},"InboxCreate":{"properties":{"label":{"type":"string","maxLength":200,"title":"Label","default":""},"phrase":{"type":"boolean","title":"Phrase","default":false},"expires_in_minutes":{"anyOf":[{"type":"integer","maximum":525600,"minimum":1},{"type":"null"}],"title":"Expires In Minutes"},"transport":{"type":"string","const":"email","title":"Transport","default":"email"}},"type":"object","title":"InboxCreate"},"InboxOut":{"properties":{"id":{"type":"string","title":"Id"},"address":{"type":"string","title":"Address"},"transport":{"type":"string","title":"Transport","default":"email"},"suspended":{"type":"boolean","title":"Suspended","default":false},"suspended_reason":{"type":"string","title":"Suspended Reason","default":""},"suspended_code":{"type":"string","title":"Suspended Code","default":"","x-known-values":["abuse","non_payment","plan_downgrade"]},"label":{"type":"string","title":"Label"},"status":{"type":"string","title":"Status"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"phrase":{"type":"string","title":"Phrase","default":""},"refused_count":{"type":"integer","title":"Refused Count","default":0},"last_refused_subject":{"type":"string","title":"Last Refused Subject","default":""},"last_refused_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refused At"},"message_count":{"type":"integer","title":"Message Count","default":0},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"}},"type":"object","required":["id","address","label","status","expires_at","created_at"],"title":"InboxOut"},"InboxPatch":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"},"status":{"anyOf":[{"type":"string","pattern":"^(enabled|disabled)$"},{"type":"null"}],"title":"Status"},"phrase":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Phrase"}},"type":"object","title":"InboxPatch"},"IngestOut":{"properties":{"accepted":{"type":"boolean","title":"Accepted"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["accepted"],"title":"IngestOut"},"LinksByPart":{"properties":{"text":{"items":{"type":"string"},"type":"array","title":"Text","default":[]},"html":{"items":{"type":"string"},"type":"array","title":"Html","default":[]}},"type":"object","title":"LinksByPart","description":"The links of each MIME part separately — see `Extracted.links_by_part`."},"MessageDetailOut":{"properties":{"id":{"type":"string","title":"Id"},"inbox_id":{"type":"string","title":"Inbox Id"},"from_addr":{"type":"string","title":"From Addr"},"to_addr":{"type":"string","title":"To Addr"},"subject":{"type":"string","title":"Subject"},"auth":{"$ref":"#/components/schemas/AuthVerdicts"},"size_bytes":{"type":"integer","title":"Size Bytes"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"extracted":{"anyOf":[{"$ref":"#/components/schemas/Extracted"},{"type":"null"}]},"transport":{"type":"string","title":"Transport","default":"email"},"seen_count":{"type":"integer","title":"Seen Count","default":1},"text_body":{"type":"string","title":"Text Body"},"html_body":{"type":"string","title":"Html Body"},"truncated":{"type":"boolean","title":"Truncated"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentOut"},"type":"array","title":"Attachments"},"headers":{"anyOf":[{"items":{"$ref":"#/components/schemas/HeaderOut"},"type":"array"},{"type":"null"}],"title":"Headers"}},"type":"object","required":["id","inbox_id","from_addr","to_addr","subject","auth","size_bytes","received_at","expires_at","text_body","html_body","truncated","attachments","headers"],"title":"MessageDetailOut"},"MessageOut":{"properties":{"id":{"type":"string","title":"Id"},"inbox_id":{"type":"string","title":"Inbox Id"},"from_addr":{"type":"string","title":"From Addr"},"to_addr":{"type":"string","title":"To Addr"},"subject":{"type":"string","title":"Subject"},"auth":{"$ref":"#/components/schemas/AuthVerdicts"},"size_bytes":{"type":"integer","title":"Size Bytes"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"extracted":{"anyOf":[{"$ref":"#/components/schemas/Extracted"},{"type":"null"}]},"transport":{"type":"string","title":"Transport","default":"email"},"seen_count":{"type":"integer","title":"Seen Count","default":1}},"type":"object","required":["id","inbox_id","from_addr","to_addr","subject","auth","size_bytes","received_at","expires_at"],"title":"MessageOut"},"MessagePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MessageOut"},"type":"array","title":"Items"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"next_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Until"}},"type":"object","required":["items"],"title":"MessagePage","description":"A message list. A search (`q`, or a `header`) pages by `next_until`, never by `next_offset`.\n\nbind's `RequestPage` rule (RFC-0028 §3.1), so both consoles page a search the same way."},"Page_AuditOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AuditOut"},"type":"array","title":"Items"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items"],"title":"Page[AuditOut]"},"Page_InboxOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InboxOut"},"type":"array","title":"Items"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items"],"title":"Page[InboxOut]"},"PlanOut":{"properties":{"plan":{"type":"string","title":"Plan"},"enforced_as":{"type":"string","title":"Enforced As"},"ceilings":{"additionalProperties":{"type":"integer"},"type":"object","title":"Ceilings"},"past_due":{"type":"boolean","title":"Past Due","default":false}},"type":"object","required":["plan","enforced_as","ceilings"],"title":"PlanOut"},"SubscriptionChangedIn":{"properties":{"org_id":{"type":"string","maxLength":64,"minLength":1,"title":"Org Id"},"product":{"type":"string","maxLength":32,"minLength":1,"title":"Product"},"tier":{"type":"string","maxLength":32,"minLength":1,"title":"Tier"},"status":{"type":"string","maxLength":16,"minLength":1,"title":"Status"},"version":{"type":"integer","maximum":2147483647,"minimum":1,"title":"Version"},"subscription_id":{"anyOf":[{"type":"string","maxLength":40,"minLength":1},{"type":"null"}],"title":"Subscription Id"},"cycle":{"type":"string","maxLength":8,"minLength":1,"title":"Cycle","default":"monthly"},"anchor_day":{"anyOf":[{"type":"integer","maximum":31,"minimum":1},{"type":"null"}],"title":"Anchor Day"},"agreed_ceilings":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Agreed Ceilings"},"suspended":{"type":"boolean","title":"Suspended","default":false},"effective_at":{"type":"string","format":"date-time","title":"Effective At"}},"type":"object","required":["org_id","product","tier","status","version","effective_at"],"title":"SubscriptionChangedIn","description":"A `subscription.changed` event: a workspace's subscription to one product, its tier and\nstatus, as of `effective_at`. Keys not listed here are ignored; a value outside its stated\nbounds is refused with a 422."},"SubscriptionEventOut":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"plan":{"type":"string","title":"Plan"},"enforced_as":{"type":"string","title":"Enforced As"},"outcome":{"type":"string","title":"Outcome"}},"type":"object","required":["workspace_id","plan","enforced_as","outcome"],"title":"SubscriptionEventOut","description":"What was actually done with the event.\n\n``outcome`` is reported rather than swallowed so a replay is distinguishable from an applied\nchange in the producer's own delivery log — both are 200, and they must be, because a replay is\na success rather than something to retry."},"UsageOut":{"properties":{"period":{"type":"string","title":"Period"},"messages":{"type":"integer","title":"Messages"},"monthly_messages":{"type":"integer","title":"Monthly Messages"},"purchased_messages":{"type":"integer","title":"Purchased Messages","default":0}},"type":"object","required":["period","messages","monthly_messages"],"title":"UsageOut"},"CreditEventIn":{"properties":{"event":{"type":"string","enum":["credit.balance_changed","credit.policy_changed"],"title":"Event"},"event_id":{"type":"string","maxLength":64,"minLength":1,"title":"Event Id"},"workspace_id":{"type":"string","maxLength":64,"minLength":1,"title":"Workspace Id"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"product":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Product"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","required":["event","event_id","workspace_id","occurred_at"],"title":"CreditEventIn","description":"A billingd ``credit.*`` event (RFC-0023 §4). Unknown keys are ignored."},"CreditEventOut":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"outcome":{"type":"string","title":"Outcome"}},"type":"object","required":["workspace_id","outcome"],"title":"CreditEventOut","description":"What was done with the event: ``applied``, ``stale`` or ``no_workspace``, all 200."}}},"x-error-codes":{"aliases":{"internal":{"code":"internal_error","reason":null},"invalid_request":{"code":"validation_error","reason":null},"unprocessable":{"code":"validation_error","reason":null}},"client_only":["bad_response","gateway_error","network_error","timeout"],"codes":{"bad_envelope":{"audience":"machine","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[400],"umbrella":false},"bad_request":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[400],"umbrella":false},"conflict":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null},"hostname":{"format":"identifier","join":null,"kind":"value","required":false,"values":null},"slug":{"format":"identifier","join":null,"kind":"value","required":false,"values":null}},"reasons":{},"replaced_by":null,"status":[409],"umbrella":true},"error":{"audience":"customer","complete":false,"count_param":null,"deprecated":true,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":null,"replaced_by":null,"status":[],"umbrella":false},"forbidden":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{"required":{"format":null,"join":null,"kind":"selector","required":false,"values":["admin"]}},"reasons":{"csrf":{},"membership":{},"not_provisioned":{},"operator":{},"product_not_enabled":{},"project":{},"project_confined":{},"role":{},"scope":{}},"replaced_by":null,"status":[403],"umbrella":true},"internal":{"audience":"customer","complete":false,"count_param":null,"deprecated":true,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":null,"replaced_by":"internal_error","status":[500],"umbrella":false},"internal_error":{"audience":"customer","complete":true,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[500],"umbrella":false},"invalid_credential":{"audience":"customer","complete":true,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[401,403],"umbrella":false},"invalid_request":{"audience":"customer","complete":false,"count_param":null,"deprecated":true,"diagnostic_reasons":[],"entry_types":{"bool_parsing":{},"bool_type":{},"date_parsing":{},"date_type":{},"datetime_from_date_parsing":{},"datetime_parsing":{},"datetime_type":{},"dict_type":{},"enum":{},"extra_forbidden":{},"finite_number":{},"float_parsing":{},"float_type":{},"greater_than":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"greater_than_equal":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"int_from_float":{},"int_parsing":{},"int_parsing_size":{},"int_type":{},"json_invalid":{},"json_type":{},"less_than":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"less_than_equal":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"list_type":{},"literal_error":{},"missing":{},"model_attributes_type":{},"model_type":{},"string_pattern_mismatch":{},"string_too_long":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"string_too_short":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"string_type":{},"string_unicode":{},"too_long":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"too_short":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"url_parsing":{},"url_type":{},"uuid_parsing":{},"uuid_type":{}},"params":{},"reasons":null,"replaced_by":"validation_error","status":[422],"umbrella":false},"method_not_allowed":{"audience":"customer","complete":true,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[405],"umbrella":false},"not_entitled":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{"feature":{"format":null,"join":null,"kind":"selector","required":false,"values":["optional_phrase_gate","read_api"]}},"reasons":{},"replaced_by":null,"status":[402],"umbrella":false},"not_found":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{"id":{"format":"identifier","join":null,"kind":"value","required":false,"values":null}},"reasons":{"inbox":{},"message":{},"workspace":{}},"replaced_by":null,"status":[404],"umbrella":true},"payload_too_large":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{"limit":{"format":"bytes","join":null,"kind":"value","required":true,"values":null},"size":{"format":"bytes","join":null,"kind":"value","required":false,"values":null}},"reasons":{},"replaced_by":null,"status":[413],"umbrella":false},"plan_violation":{"audience":"customer","complete":false,"count_param":null,"deprecated":true,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":null,"replaced_by":null,"status":[402],"umbrella":false},"quota_exceeded":{"audience":"customer","complete":false,"count_param":"limit","deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{"current":{"format":"number","join":null,"kind":"value","required":false,"values":null},"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null},"metric":{"format":null,"join":null,"kind":"selector","required":false,"values":["inboxes","messages"]},"period":{"format":null,"join":null,"kind":"value","required":false,"values":null}},"reasons":{"allocation":{},"period":{"credit":{"format":null,"join":null,"kind":"selector","required":false,"values":["empty","off","pending"]}}},"replaced_by":null,"status":[402],"umbrella":false},"rate_limited":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{"retry_after":{"format":"seconds","join":null,"kind":"value","required":false,"values":null}},"reasons":{"inbox_rate":{"rate_per_min":{"format":"number","join":null,"kind":"value","required":true,"values":null}}},"replaced_by":null,"status":[429],"umbrella":false},"unauthorized":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{"expired":{},"invalid":{},"missing":{},"no_workspace":{},"revoked":{}},"replaced_by":null,"status":[401],"umbrella":true},"unavailable":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{"retry_after":{"format":"seconds","join":null,"kind":"value","required":false,"values":null}},"reasons":{"ingest_disabled":{},"plan_service":{}},"replaced_by":null,"status":[503],"umbrella":false},"unparseable_message":{"audience":"machine","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[400],"umbrella":false},"unprocessable":{"audience":"customer","complete":false,"count_param":null,"deprecated":true,"diagnostic_reasons":[],"entry_types":{"bool_parsing":{},"bool_type":{},"date_parsing":{},"date_type":{},"datetime_from_date_parsing":{},"datetime_parsing":{},"datetime_type":{},"dict_type":{},"enum":{},"extra_forbidden":{},"finite_number":{},"float_parsing":{},"float_type":{},"greater_than":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"greater_than_equal":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"int_from_float":{},"int_parsing":{},"int_parsing_size":{},"int_type":{},"json_invalid":{},"json_type":{},"less_than":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"less_than_equal":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"list_type":{},"literal_error":{},"missing":{},"model_attributes_type":{},"model_type":{},"string_pattern_mismatch":{},"string_too_long":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"string_too_short":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"string_type":{},"string_unicode":{},"too_long":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"too_short":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"url_parsing":{},"url_type":{},"uuid_parsing":{},"uuid_type":{}},"params":{},"reasons":null,"replaced_by":"validation_error","status":[422],"umbrella":false},"unprocessable_event":{"audience":"machine","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[422],"umbrella":false},"validation_error":{"audience":"customer","complete":false,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{"bool_parsing":{},"bool_type":{},"date_parsing":{},"date_type":{},"datetime_from_date_parsing":{},"datetime_parsing":{},"datetime_type":{},"dict_type":{},"enum":{},"extra_forbidden":{},"finite_number":{},"float_parsing":{},"float_type":{},"greater_than":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"greater_than_equal":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"inboxes.search_conflict":{},"int_from_float":{},"int_parsing":{},"int_parsing_size":{},"int_type":{},"json_invalid":{},"json_type":{},"less_than":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"less_than_equal":{"limit":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"list_type":{},"literal_error":{},"missing":{},"model_attributes_type":{},"model_type":{},"string_pattern_mismatch":{},"string_too_long":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"string_too_short":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"string_type":{},"string_unicode":{},"too_long":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"too_short":{"count":{"format":"number","join":null,"kind":"value","required":false,"values":null}},"url_parsing":{},"url_type":{},"uuid_parsing":{},"uuid_type":{}},"params":{},"reasons":{},"replaced_by":null,"status":[422],"umbrella":true},"workspace_frozen":{"audience":"customer","complete":true,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[402],"umbrella":false},"workspace_suspended":{"audience":"customer","complete":true,"count_param":null,"deprecated":false,"diagnostic_reasons":[],"entry_types":{},"params":{},"reasons":{},"replaced_by":null,"status":[402],"umbrella":false}},"status_codes":{"400":"bad_request","401":"unauthorized","403":"forbidden","404":"not_found","405":"method_not_allowed","409":"conflict","413":"payload_too_large","422":"validation_error","429":"rate_limited","500":"internal_error","503":"unavailable"},"version":1},"servers":[{"url":"https://inboxes.nimbusnexus.net"}]}