{"openapi":"3.1.0","info":{"title":"api.rafa.voyage","version":"0.1.0","description":"jedger's API: one host, one Cloudflare Worker per schema behind it. A request for `/<schema>/…` is handed unchanged to that schema's Worker, which examines the credential and answers. This document is the union of the Workers' own OpenAPI documents, each `GET /<schema>/v1/openapi.json`: a Worker's paths, and its components and tags under its schema's name (`machine.Sensor`, `machine.sensors`). A Worker that reads its schema's comments from the database holds each table's comment in its own document, as the Schema Object its row is joined to; this document is built without a database and holds none.\n\nWhat the host answers itself, beside the Workers:\n\n- `GET` and `HEAD` on `/` answer this document with the Workers this host answers in it, and a Swagger UI page for `Accept: text/html`; any other method is 405 `method_not_allowed` with `Allow: GET, HEAD`.\n- A prefix this host holds no Worker for is 404 `resource_missing`, in the envelope each Worker's `ApiErrorBody` states. A host whose hub binds no artifact Worker sends `/artifact/*` to jedger's own API, without the `Cookie` header.\n- CORS is answered here once. A request from an https origin the host's `ACCESS_CONTROL_ALLOW_ORIGIN` row admits has its `OPTIONS` answered 204, and every answer stamped `Access-Control-Allow-Origin` with that origin, `Access-Control-Allow-Credentials: true` and `Access-Control-Expose-Headers`; every answer carries `Vary: Origin`.\n- An answer forwarded from a Worker carries `Server-Timing: forwarded;desc=\"<where>\";dur=<milliseconds>` after the Worker's own, `<where>` the binding, or the origin an artifact request was sent to.\n- A `GET` or `HEAD` whose Worker has not answered its headers within 5 s is 504 `gateway_timeout`, type `upstream_error`.","contact":{"url":"https://rafa.voyage"}},"tags":[{"name":"identity.openapi","description":"This document."},{"name":"identity.openid","description":"jedger's OpenID Provider, issuer `<API_ORIGIN>/identity/v1`: its metadata and its JWK Set, public, served only where the hostname holds `ID_TOKEN_SIGNING_KEY`."},{"name":"identity.users","description":"One row per person or agent who signs in, shared by every organization. `data` holds the user's own name and preferences, its keys fixed by the request schema, each with its meaning: `ietf.org:card`, the user's own JSContact Card, whose `name.full` is the name every site shows; `openid.net:locale`; `csswg.org:prefers-color-scheme`; `limit`; `conversation` and `design`, each site's options; and `iam`, `identity`, `machine`, `artifact` and `finance`, each site's table settings. Any other key is 400. `metadata.act` is the row's id; `metadata.sub` the same on a person, the minting person on an agent."},{"name":"identity.oauth_accounts","description":"One OpenID Connect identity (`iss`, `sub`) a person signs in with. Written by the provider callback alone; a caller lists and deletes."},{"name":"identity.passkeys","description":"One WebAuthn credential a person registered. Sign-up, enrolment and sign-in are the browser's ceremony: signed out, registering a passkey creates the person, their key and their session at once. A caller lists, renames and deletes. `data[\"schema.org:name\"]` is the person's label, at enrolment the provider's name the AAGUID gives in the community list (https://github.com/passkeydeveloper/passkey-authenticator-aaguids), else the browser and system of the user agent; `metadata[\"w3.org:aaguid\"]` is the authenticator's AAGUID. An agent holds none."},{"name":"identity.push_subscriptions","description":"One browser or tablet a person let show notifications, the W3C Push API's own `PushSubscription` (https://www.w3.org/TR/push-api/#pushsubscription-interface). Written by the browser, renamed and deleted by its person; the conversation Worker, as the hostname's own device, reads the rows of the people a conversation event notifies and deletes one its push service answers gone. Which events notify whom is the person's `users.data.conversation[\"aws.amazon.com:notificationConfigurations\"]`. An agent holds none."},{"name":"identity.refresh_tokens","description":"One vendor grant a person made to a hostname's client, RFC 6749's refresh token (https://datatracker.ietf.org/doc/html/rfc6749#section-1.5), today Google's, so a door may reach an API the person authorized. Written by the Worker that asked for the grant, the iam Worker's Google callback or the conversation Worker's; a caller lists, retrieves and deletes. The token itself is sealed in the row and never answered, never in an event."},{"name":"identity.service_tokens","description":"A machine's bearer credential: an agent's, a user whose `sub` is not its `act`, and its only way in. A person signs in by passkey or OAuth alone, so a token is never minted for a person; a person's token minted before 2026-10-29 still signs in until its row is deleted. The secret is shown once, on create; the row keeps its SHA-256. Revoke by deleting the row."},{"name":"identity.authorization_grants","description":"A sign-in in flight, jedger's CLI's by RFC 8628's device grant or RFC 6749's code grant with PKCE, or a registered relying party's authorization code; lives minutes. A person approves a device request, and the CLI's authorization code, on the identity site's page that its `user_code` names. A row carries neither the code nor `code_hash`, its SHA-256; approving the CLI's authorization code answers the code once."},{"name":"identity.events","description":"The schema's history, written by the statement that wrote the row, `<table>.<created|retrieved|listed|updated|deleted>`, the read types being `passkey.retrieved`, `event.retrieved` and `events.listed` alone; `data` is the whole old row on `updated` and `deleted` less its secrets: a refresh token's `jwe`, a service token's `token_hash`, an authorization grant's `code_hash` and a push subscription's `auth`. You read your own; nobody writes one."},{"name":"conversation.openapi"},{"name":"conversation.threads"},{"name":"conversation.messages"},{"name":"conversation.attachments"},{"name":"conversation.actions"},{"name":"conversation.calendars"},{"name":"conversation.calendar_events"},{"name":"conversation.events"},{"name":"artifact.openapi","description":"This document."},{"name":"artifact.artifacts","description":"`artifact.artifacts`: one release of one program for one target, unique on (`program_name`, `version`, `target`); the first row of a list for a program and a target is its latest release."},{"name":"artifact.cards","description":"`artifact.cards`: an organization's JSContact card about rows of this schema, one nullable link per table."},{"name":"artifact.deployments","description":"`artifact.deployments`: which release should run on a device (`status` `spec`, a person's) and which does (`current`, the device's own observation)."},{"name":"artifact.device_credentials","description":"`artifact.device_credentials`: one value a program reads on its device, `data.name` the name it reads it by, `value` plain or HPKE-sealed to the device's `data.pkR`."},{"name":"artifact.devices","description":"`artifact.devices`: anything a program runs on, a box, a VPS, the Workers of one hostname, a database instance."},{"name":"artifact.events","description":"`artifact.events`: the history of every row, `<table>.<created|updated|deleted>`, written by the doors themselves."},{"name":"artifact.programs","description":"`artifact.programs`: the catalogue, one row per program, `name` unique."},{"name":"artifact.registrations","description":"`artifact.registrations`: one domain name jedger holds through its own Cloudflare account, each row jedger's; `data` is Cloudflare's own keys."},{"name":"artifact.service_tokens","description":"`artifact.service_tokens`: a device's long-lived secret, stored as its hash and shown once."},{"name":"design.openapi","description":"This document."},{"name":"design.pages","description":"`design.pages`: one page in every language, `data.sections` and `data.localizations`, drawn by jedger's one template at `https://design.<zone>/<lang>/pages/<id>`. Its title and group are `data[\"schema.org:name\"]` and `data[\"schema.org:keywords\"]`."},{"name":"design.attachments","description":"`design.attachments`: one file a page shows, `page_id` the page, `filename`, `media_type` and `size` its columns, `metadata` the page's own copied whole so the file is judged as its page; the bytes are the R2 object keyed by `id`, answered through this Worker alone."},{"name":"design.redirects","description":"`design.redirects`: a short link or a page's name, `source_url` (host and path, no query) answered with `data.target_url`, `status_code` (301, 302, 307, 308) and `preserve_query_string`, Cloudflare's Bulk Redirects parameters, and, once followed, `data.schema.org:interactionStatistic`, schema.org's InteractionCounter of UseAction whose `userInteractionCount` is the uses a site counted. Always public."},{"name":"design.events","description":"`design.events`: the history of every row, `<table>.<created|updated|deleted>`, the three a write of these doors records (no read records one), `data` the whole old row on `updated` and `deleted`, null otherwise; a refused write's event carries `metadata.error_code` `AccessDenied` and `data` null. `page_id`, `redirect_id` or `attachment_id` names the row while it lives, and `metadata.object_id` names it for life. Written by the doors, read by AdministratorAccess and ReadOnlyAccess."},{"name":"iam.openapi","description":"This document."},{"name":"iam.organizations","description":"AWS's account: every membership, post and card is scoped by one. `data` is everything the organization says about itself, a JSContact Card of `kind: org`: `name`, `notes` (its description), `media` (its logo), `emails`, `phones`, `links`, `localizations`, `schema.org:slogan`, `w3.org:identifier`. `metadata` holds `organization_id` and `email_verified`, the addresses the outbound mail may send from. Never deleted while events name it."},{"name":"iam.memberships","description":"AWS's IAM user, the principal. Held by `user_id` or `device_id` or nobody (an empty membership, a card's subject with no credential). `data` is the inline policy (empty by default); `metadata` the tags: `organization_id`, `membership_id`, `user_id`|`device_id`, `sub`, `act` (a device's own id as both), `uri`, and `api_version`, the date of `data`'s shape, written by every write but a device's POST of an empty membership; a role is a post it holds, never a tag. One per user and per device in an organization."},{"name":"iam.posts","description":"AWS's user group; `data` is its managed policy, shared by every holder, so it names no one (`${PrincipalTag/membership_id}`, `${PrincipalTag/sub}`). `AdministratorAccess`, `anon` and `ReadOnlyAccess` are jedger's three posts, one text in every organization that no organization edits: their PATCH and DELETE are 403, but for a PATCH of `ietf.org:mailbox` alone, and no other post is created or renamed with one of their names (403). Its name is `data[\"schema.org:name\"]`, a string beside `Version` and `Statement`. Its `metadata` holds `organization_id`, `api_version`, and two tags a request names top-level, beside `data`: `ietf.org:mailbox`, the lowercase addresses mail reaches its holders at, one post each, and `keycloak.org:defaultGroup`."},{"name":"iam.membership_posts","description":"A membership holds a post, at most twenty (`check_violation`). Owned by the post. An empty join with an expected `uri` list is an invitation that fills when a membership attaches those proven addresses; it expires after fifteen days. Deleted and re-inserted, never patched. `metadata` holds `organization_id`, `post_id`, `schema.org:name` (the post's name), `sub` and `act` (the holder's), and `uri` (what an empty join expects, then the holder's attached list); no request writes it."},{"name":"iam.cards","description":"A JSContact Card (RFC 9553) the organization keeps about a membership: a member, a customer, an agent, or a configuration card, one holding keys outside JSContact's own (this document's description lists them, under \"Your instructions\"). `data.name.full` is the name, `data.emails`, `data.phones` and `data.links` the addresses (JSContact's maps, each entry under an id of yours; give the address jedger should mail `pref: 1`), and `data.onlineServices` the messaging accounts (RFC 9553 section 2.3.2: `{\"<id>\": {\"service\": \"kakao\", \"user\": \"<name>\"}}`, at least one of `uri` and `user`). `metadata.email` is that notification address, the entry with the lowest `pref`, else the lowest id; `metadata.email_verified` lists the addresses a sign-in proved; `metadata` also copies `organization_id`, `membership_id` and the membership's `sub` and `act`; no request writes any of them. `ai-sdk.dev:instructions` is answered only to a caller who may also update the card. `w3.org:audience` names the group of readers, e.g. `support`."},{"name":"iam.events","description":"Every create, update and delete of an iam row, written by the same statement, `<table>.<created|updated|deleted>`; a refused write is an `AccessDenied` event. No read writes an event: no door writes a `retrieved` or `listed` event. `data` is the row before an update or delete, else null. `metadata` holds `organization_id`, `api_version`, `object_id` (the row's id), `sub` and `act` (absent when the system acted), the request's `source_ip_address`, `user_agent`, `request_id` and `access_key_id`, and `error_code` on a refused write. `card_id`, `membership_id`, `membership_post_id` and `post_id` name the row while it stands; a `.deleted` event carries none. Read only."}],"security":[{"userJwt":[]},{"deviceJwt":[]},{"userJwtCookie":[]}],"paths":{"/identity/v1/openapi.json":{"get":{"tags":["identity.openapi"],"summary":"This document.","description":"Public, the same for every caller of one hostname. GET and HEAD alone; any other method is 405 `method_not_allowed` with `Allow: GET, HEAD`.","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","headers":{"Cache-Control":{"description":"public, max-age=300","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string","const":"3.1.0"}},"required":["openapi"],"additionalProperties":{}}}}},"default":{"description":"A refusal: nothing the request asked for was written. The status says whose problem it is, `code` what to match on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/users":{"get":{"tags":["identity.users"],"summary":"List one page of your own users row and your agents', newest first.","description":"Narrow with `?id=<uuid>&id=<uuid>…`, at most 100 ids. Page with `limit`, `starting_after` and `ending_before`; a page shorter than `limit` is the last. The hostname's own device, the one device this door answers, must name the rows in `id` (400 `parameter_missing` otherwise) and is answered each as `id` and `data` holding only `openid.net:locale` and `conversation[\"aws.amazon.com:notificationConfigurations\"]`, the setting and the language of the people a conversation event notifies, never the whole row; any other device is 403 `user_required`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"id","schema":{"description":"One users row id, repeated for each, at most 100: only those rows of your tree.","maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/identity.Uuid"}},"description":"One users row id, repeated for each, at most 100: only those rows of your tree.","required":false}],"responses":{"200":{"description":"A bare array of users.","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/identity.User"}},{"type":"array","items":{"$ref":"#/components/schemas/identity.UserNotifications"}}]}}}},"400":{"description":"A query parameter refused, how each is named below. More than 100 `id`s is `invalid_request` with `param` `id`, and one that is no UUID `invalid_request` with `param` `id[<n>]`, its place counted from 0. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"post":{"tags":["identity.users"],"summary":"Mint an agent, a users row whose `sub` is you.","description":"A person only: an agent mints no agent. `data` is at most 2,048 bytes, its compact JSON as UTF-8, since it rides in the session cookie. At birth the agent is given one membership in the organization this hostname serves, at iam, joined to that organization's `anon` post, with the organization's card about it carrying the agent's `name.full` when it has one. When iam refuses that membership, the agent's row is deleted again and the call answers 502. Give it a service token next.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.UserCreateRequest"}}}},"responses":{"201":{"description":"The agent's row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.User"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your JWT is an agent's: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"`data` would pass 2,048 bytes, its compact JSON as UTF-8, the most the session cookie carries: `data_too_large`, `param` `data`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"502":{"description":"iam refused the agent's membership: `bad_gateway`, the message carrying iam's status and code. The agent's row is deleted again, with its `user.deleted` event, so no agent stands without its membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/users/{id}":{"get":{"tags":["identity.users"],"summary":"Retrieve a users row, or sign in with a service token.","description":"With your JWT: the row; on your own row a renewed JWT, its `auth_time` the presented one's: `Authentication-Info: token=\"<jwt>\", expires_in=<s>` to a caller that sent `Authorization: Bearer`, the `user_jwt` cookie to a cookie caller, as the PATCH answers. With no JWT and a service token's secret as the bearer: the sign-in, the row and a fresh user JWT on `Authentication-Info`; a wrong secret or id is 401 `invalid_token` alike. jedgerd does the sign-in for you.","security":[{"userJwt":[]},{"userJwtCookie":[]},{"serviceToken":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row.","headers":{"Authentication-Info":{"description":"`token=\"<user JWT>\", expires_in=<seconds>` (RFC 7615, https://www.rfc-editor.org/rfc/rfc7615#section-3): on your own row, to a bearer caller, the renewed JWT; on the service-token sign-in the fresh one; absent on an agent's row read by its person.","schema":{"type":"string"}},"Set-Cookie":{"description":"On your own row, to a cookie caller: the `user_jwt` cookie carrying the renewed JWT, with `Cache-Control: private`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.User"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"The service-token sign-in: no JWT and no bearer, or a secret and id that open no session, a `{id}` that is no UUID among them: `invalid_token`.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"patch":{"tags":["identity.users"],"summary":"Change your own or your agent's `data`.","description":"One shallow merge of `data`; `null` removes a key. Beside the keys `data` names, a key of your own under its owner's prefix, `example.com:note`, takes any JSON value, is read by no statement and no site, and rides in your JWT like the rest; any other key is refused, naming it. The merged `data` is at most 2,048 bytes, its compact JSON as UTF-8, since it rides in the session cookie. On your own row the answer carries the fresh JWT, so the change holds from your next request: `Authentication-Info` to a caller that sent `Authorization: Bearer`, the `user_jwt` cookie to a cookie caller.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.UserPatch"}}}},"responses":{"200":{"description":"The row after the patch.","headers":{"Authentication-Info":{"description":"`token=\"<user JWT>\", expires_in=<seconds>` (RFC 7615): on your own row, to a bearer caller, the JWT carrying the change.","schema":{"type":"string"}},"Set-Cookie":{"description":"On your own row, to a cookie caller: the `user_jwt` cookie carrying the change, with `Cache-Control: private`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.User"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or a JWT expired or forged: `invalid_token`.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"`data` would pass 2,048 bytes, its compact JSON as UTF-8, the most the session cookie carries: `data_too_large`, `param` `data`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"delete":{"tags":["identity.users"],"summary":"Delete an agent you minted.","description":"Deletes the agent's oauth_accounts, passkeys and service_tokens with it, each with its event; its memberships stay at iam, emptied first. A person's own row is refused 409 `restrict_violation` while memberships point at it.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.User"}}}},"401":{"description":"No credential, or a JWT expired or forged: `invalid_token`.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/logout":{"post":{"tags":["identity.users"],"summary":"Sign the browser out: clear the `user_jwt` cookie.","description":"A browser's call, needing no credential and no body; no provider is told. The JWT the cookie held stays good until its own `exp` wherever else it was copied. Any other method is 405 `method_not_allowed` with `Allow: POST`.","security":[],"responses":{"200":{"description":"An empty body.","headers":{"Set-Cookie":{"description":"`user_jwt` cleared, `Max-Age=0`, twice: on the hostname's `Domain`, and host-only, a browser counting the two as different cookies.","schema":{"type":"string"}}}},"default":{"description":"A refusal: nothing the request asked for was written. The status says whose problem it is, `code` what to match on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/oauth_accounts":{"get":{"tags":["identity.oauth_accounts"],"summary":"List one page of the OpenID Connect identities of your tree, newest first.","description":"Each row is `iss` and `sub` under its `user_id`; `metadata.email_verified` is the addresses the provider confirmed on the latest sign-in.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false}],"responses":{"200":{"description":"A bare array of oauth_accounts.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/identity.OauthAccount"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/oauth_accounts/{id}":{"get":{"tags":["identity.oauth_accounts"],"summary":"Retrieve one OpenID Connect identity.","description":"Your own or your agent's.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.OauthAccount"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"patch":{"tags":["identity.oauth_accounts"],"summary":"Accepts an empty body only.","description":"`iss`, `sub` and `user_id` are the ceremony's to write, never a door's; there is nothing to change. The row's `sub` and `act` are copied again from its users row, and `oauth_account.updated` is written all the same.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.OauthAccountPatch"}}}},"responses":{"200":{"description":"The row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.OauthAccount"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"delete":{"tags":["identity.oauth_accounts"],"summary":"Unlink one OpenID Connect identity.","description":"Only when the person asked.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.OauthAccount"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/{provider}":{"post":{"tags":["identity.oauth_accounts"],"summary":"Start a sign-in, or a link, at Google, Kakao or jedger's own OpenID Provider (`jedger`).","description":"A browser's form POST, signed out to sign in, signed in as a person to link one more identity. `?redirect_uri=` is required, the full URL the browser returns to, admitted by the hostname's `REDIRECT_URI`. Answers 302 to the provider's authorization endpoint with `Set-Cookie` `__Host-oauth_state` and, for Google and `jedger` (PKCE), `__Host-oauth_verifier`, both ten minutes; for `jedger` that endpoint is `<JEDGER_API_ORIGIN>/identity/v1/authorize` with `scope=openid`, `client_id` `JEDGER_CLIENT_ID`, this host's `/identity/v1/jedger/callback`, and a `nonce`, the S256 of the `state`; with `Accept: application/json` it answers 200 and the authorization URL's query parameters as one JSON object instead, the cookies the same. A row `SUPPORTED_IDENTITY_PROVIDERS` absent or malformed, or a listed provider whose client id and secret are not both bound, answers 500 `server_error`. Any other method is 405 `method_not_allowed` with `Allow: POST`.","security":[],"x-ietf.org:safe":true,"parameters":[{"in":"path","name":"provider","schema":{"type":"string","enum":["google","kakao","jedger"],"description":"The OpenID provider; one the hostname's `SUPPORTED_IDENTITY_PROVIDERS` does not list is 404 `provider_unsupported`."},"required":true,"description":"The OpenID provider; one the hostname's `SUPPORTED_IDENTITY_PROVIDERS` does not list is 404 `provider_unsupported`."},{"in":"query","name":"redirect_uri","schema":{"type":"string","description":"The full URL to land on afterwards, at most 2,048 characters as sent (`REDIRECT_URI_MAX_LENGTH`); `REDIRECT_URI` admits it or the call is 400."},"required":true,"description":"The full URL to land on afterwards, at most 2,048 characters as sent (`REDIRECT_URI_MAX_LENGTH`); `REDIRECT_URI` admits it or the call is 400."}],"responses":{"302":{"description":"302 to the provider; 200 JSON under `Accept: application/json`.","headers":{"Location":{"description":"The provider's authorization endpoint.","schema":{"type":"string"}},"Set-Cookie":{"description":"`__Host-oauth_state` and, for Google and `jedger`, `__Host-oauth_verifier`, HttpOnly, ten minutes; on the 200 under `Accept: application/json` too.","schema":{"type":"string"}}}},"400":{"description":"No `redirect_uri`, one that is no URL, one longer than 2,048 characters, or one `REDIRECT_URI` does not admit: `invalid_request`, `param` `redirect_uri`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`. A start another site submits, `Sec-Fetch-Site` other than `same-origin`, `same-site` or `none`, or an `Origin` that is neither this host nor one `ACCESS_CONTROL_ALLOW_ORIGIN` admits (`null` included): `forbidden`, at every provider.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"A provider the hostname's `SUPPORTED_IDENTITY_PROVIDERS` does not list: `provider_unsupported`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"500":{"description":"That row absent or malformed, or a listed provider whose client id and secret are not both bound: `server_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/{provider}/callback":{"get":{"tags":["identity.oauth_accounts"],"summary":"The provider's redirect target; never called by hand.","description":"The provider lands the browser here with `code` and `state`. The door checks `state` against the `__Host-oauth_state` cookie, spends `code` at the provider, and reads the person's `(iss, sub)`. Signed in as a person, it links the identity to them and answers 302 to the destination `state` carried; when another user holds that identity, the destination gains `link_error=link_held_by_other&link_provider=<provider>`. Signed out, it signs the person in, making their users row and oauth_accounts row on the first sign-in and giving them a membership in this hostname's organization on its `anon` post, and answers 302 to the destination with `Set-Cookie` `user_jwt`. For `jedger` the code is spent at `<JEDGER_API_ORIGIN>/identity/v1/token` by `client_secret_basic` (`JEDGER_CLIENT_ID`, `JEDGER_CLIENT_SECRET`), and the `id_token` is verified against that provider's JWK Set, `iss` `<JEDGER_API_ORIGIN>/identity/v1`, `aud` `JEDGER_CLIENT_ID`, `exp`, and `nonce` the S256 of the `state`; its `sub` is the users row itself, so no oauth_accounts row is written: signed out, the person is healed into this hostname's organization as a passkey sign-in heals them and answered 302 with `user_jwt`; signed in as that very row, 302 with nothing written; signed in as another, the destination gains `link_error=link_held_by_other&link_provider=jedger`. Every 302 clears the `__Host-oauth_*` cookies, and of the refusals the 403 and `jedger`'s `code_exchange_failed` do; every other refusal leaves them to their ten minutes. A deploy fault answers 500 `server_error`: no hostname device id, no user answered, a row `SUPPORTED_IDENTITY_PROVIDERS` absent or malformed, or a listed provider whose client id and secret are not both bound. When iam refuses a new person's membership, the person is deleted again and the call answers 502 `bad_gateway`; a known person's failed heal is logged and the sign-in stands. Any other method is 405 `method_not_allowed` with `Allow: GET, HEAD`.","security":[],"parameters":[{"in":"path","name":"provider","schema":{"type":"string","enum":["google","kakao","jedger"],"description":"The OpenID provider; one the hostname's `SUPPORTED_IDENTITY_PROVIDERS` does not list is 404 `provider_unsupported`."},"required":true,"description":"The OpenID provider; one the hostname's `SUPPORTED_IDENTITY_PROVIDERS` does not list is 404 `provider_unsupported`."},{"in":"query","name":"code","schema":{"description":"The provider's authorization code.","type":"string"},"description":"The provider's authorization code.","required":false},{"in":"query","name":"state","schema":{"description":"The `state` the start door minted.","type":"string"},"description":"The `state` the start door minted.","required":false},{"in":"query","name":"error","schema":{"description":"Present when the person declined: 400 `provider_denied`.","type":"string"},"description":"Present when the person declined: 400 `provider_denied`.","required":false}],"responses":{"302":{"description":"302 to the destination the start carried.","headers":{"Location":{"description":"The destination the start carried, with `link_error` and `link_provider` when another user holds the identity.","schema":{"type":"string"}},"Set-Cookie":{"description":"The `__Host-oauth_*` cookies cleared; signed out, `user_jwt` too.","schema":{"type":"string"}}}},"400":{"description":"`provider_denied` (the provider sent `error`); `state_invalid` (no `code` or `state`, `state` unequal to the `__Host-oauth_state` cookie, Google's `__Host-oauth_verifier` cookie missing, or a `state` carrying no destination); `code_exchange_failed` (for `jedger`, the `id_token` not verifying among it); `provider_response_invalid`; `email_unverified` (Google's `email_verified` false); `invalid_request` (the destination is no URL, or `REDIRECT_URI` does not admit it).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`. The `oauth_*` cookies are cleared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"A provider the hostname's `SUPPORTED_IDENTITY_PROVIDERS` does not list: `provider_unsupported`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"500":{"description":"A deploy fault, or a sign-in that answered no user: `server_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"502":{"description":"iam refused a new person's membership: `bad_gateway`, the person's rows deleted again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/passkeys":{"get":{"tags":["identity.passkeys"],"summary":"List one page of the passkeys of your tree, newest first.","description":"Signed in as a person: the page, and on `Passkey-Challenge` the WebAuthn registration options for enrolling one more key, `excludeCredentials` naming every key you hold up to 100, whatever `limit` says. `expand=events` adds to each key `events`, zero or one event, its newest sign-in: a `passkey.retrieved` (a zero counter) or a `passkey.updated` that raised the counter, never a rename. Signed out, a device's JWT or a JWT that does not verify included: `[]`, the query unread, and on `Passkey-Challenge` both the sign-in's authentication options and the sign-up's registration options of a person not yet made, under one challenge. An agent is refused 403. Both arms plant the challenge in the `webauthn_challenge` cookie. The header and its cookie are the browser ceremony's: ignore them. On a hostname whose `SUPPORTED_IDENTITY_PROVIDERS` lists no `passkey`: signed out, 404 `passkey_unsupported`; signed in, the page alone, with no `Passkey-Challenge` and no cookie. That row absent or malformed answers 500 `server_error`.","security":[],"parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"expand","schema":{"x-jedger.com:filter":false,"anyOf":[{"type":"string","const":"events"},{"type":"array","items":{"type":"string","const":"events"}}]},"required":false}],"responses":{"200":{"description":"A bare array of passkeys, each with `events` under `expand=events`; signed out, `[]`.","headers":{"Passkey-Challenge":{"description":"The ceremony's WebAuthn options as JSON, every character past ASCII written as a `\\uXXXX` escape.","schema":{"type":"string"}},"Set-Cookie":{"description":"The `webauthn_challenge` cookie, HttpOnly, ten minutes, the ceremony's own `timeout`: a JWT (RFC 7519) this hostname signs, holding the challenge the ceremony's next request spends, the enrolment's `POST /passkeys` or the sign-in's `POST /token`, and its `exp`. A cookie not signed here, altered or expired is no ceremony in flight, 400 `passkey_challenge_missing`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/identity.ExpandedPasskey"}}}}},"400":{"description":"Signed in: A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"Signed out, on a hostname whose `SUPPORTED_IDENTITY_PROVIDERS` lists no `passkey`: `passkey_unsupported`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"500":{"description":"That row absent or malformed: `server_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"post":{"tags":["identity.passkeys"],"summary":"Enrol one more key, or sign up with a first one.","description":"The browser's `credential.toJSON()` of the registration, answering the challenge `GET /passkeys` planted in the `webauthn_challenge` cookie. Signed in as a person: the key joins your users row, 201 with the row. Signed out, a device's JWT included: the sign-up, the person, their key and their membership in this hostname's organization made at once, 201 with the row and `Set-Cookie` `user_jwt`; when iam refuses or fails that membership, 502 `bad_gateway`, the person and the key deleted again and no cookie planted; when the sign-up answers no user, 500 `passkey_verification_failed`. Every answer but a malformed body clears the `webauthn_challenge` cookie. A hostname whose `SUPPORTED_IDENTITY_PROVIDERS` lists no `passkey` answers 404 `passkey_unsupported`; that row absent or malformed, 500 `server_error`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.PasskeyCreateRequest"}}}},"responses":{"201":{"description":"The passkeys row written.","headers":{"Set-Cookie":{"description":"`webauthn_challenge` cleared; on the sign-up, `user_jwt` too.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.Passkey"}}}},"400":{"description":"The body is no JSON or off its schema: `invalid_request`, `param` the dotted path of the field when one field is refused. A member the schema does not name is stripped, not refused, the dictionary being the standard's. No `webauthn_challenge` cookie, one not signed by this hostname, altered or expired, or, signed out, a challenge no sign-up was minted with: `passkey_challenge_missing`. An attestation that does not verify: `passkey_verification_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`. A session that reaches no such user: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"The hostname's `SUPPORTED_IDENTITY_PROVIDERS` lists no `passkey`: `passkey_unsupported`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"The credential id is already enrolled, or the sign-up's id was already written by an earlier answer to the same challenge: `unique_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"500":{"description":"That row absent or malformed: `server_error`. A sign-up that answered no user: `passkey_verification_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"502":{"description":"iam refused or failed the sign-up's membership: `bad_gateway`; nothing was kept, press again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/passkeys/{id}":{"get":{"tags":["identity.passkeys"],"summary":"Retrieve one passkey by its row id.","description":"`id` is the row's UUID, not the WebAuthn credential id.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.Passkey"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"patch":{"tags":["identity.passkeys"],"summary":"Rename your own passkey.","description":"`{\"data\": {\"schema.org:name\": \"…\"}}`, one shallow merge of `data`; `null` removes the name. `id` is the row's UUID, as on every row door; one that is no UUID, a WebAuthn credential id among them, is 404 `resource_missing`. The sign-in is `POST /token` (its webauthn grant). Only on the person's word. An agent is refused.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.PasskeyPatch"}}}},"responses":{"200":{"description":"The row after the patch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.Passkey"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or a JWT expired or forged: `invalid_token`.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"delete":{"tags":["identity.passkeys"],"summary":"Remove one passkey.","description":"Only when the person asked.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.Passkey"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/push_subscriptions":{"get":{"tags":["identity.push_subscriptions"],"summary":"List one page of the browsers of your tree that show notifications, newest first.","description":"Your own rows; `user_id` narrows them. The hostname's own device, the one device this door answers, must name the users in `user_id` and its own hostname's key in `application_server_key` and is answered only their rows made on its own hostname, the row's `metadata.device_id` being that device, under that key, to send a Web Push for a conversation event; any other device is 403 `user_required`, and the hostname's device naming either none is 400 `parameter_missing`. A person naming either narrows their own rows.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"user_id","schema":{"description":"One users row id, repeated for each, at most 100: only the rows of those users.","maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/identity.Uuid"}},"description":"One users row id, repeated for each, at most 100: only the rows of those users.","required":false},{"in":"query","name":"application_server_key","schema":{"description":"The VAPID public key, base64url: only the rows made under it.","type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"},"description":"The VAPID public key, base64url: only the rows made under it.","required":false}],"responses":{"200":{"description":"A bare array of push_subscriptions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/identity.PushSubscription"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"post":{"tags":["identity.push_subscriptions"],"summary":"Let this browser show notifications: write its PushSubscription.","description":"The browser's own `subscription.toJSON()` (`endpoint`, `expirationTime`, `keys.p256dh`, `keys.auth`, https://www.w3.org/TR/push-api/#dom-pushsubscriptionjson) and `application_server_key`, the key it subscribed with. `data[\"schema.org:name\"]` is written from the user agent's browser and system, and `metadata.device_id` from this hostname's own device, the hostname the row belongs to. An endpoint your own row already holds answers that row, 200. A person's browser alone: no agent, no device.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.PushSubscriptionCreateRequest"}}}},"responses":{"201":{"description":"The row written, or your own row of that endpoint with 200.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.PushSubscription"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Another person's row holds this endpoint, the same browser profile having subscribed under them: `unique_violation`, `param` `endpoint`. `unsubscribe()` the browser's subscription and subscribe again for a new endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/push_subscriptions/{id}":{"get":{"tags":["identity.push_subscriptions"],"summary":"Retrieve one browser.","description":"Your own.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.PushSubscription"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"patch":{"tags":["identity.push_subscriptions"],"summary":"Rename one browser.","description":"`data` alone, one shallow merge; `null` removes the label.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.PushSubscriptionPatch"}}}},"responses":{"200":{"description":"The row after the patch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.PushSubscription"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused. A query key other than `application_server_key`, which a rename ignores, is 400 too.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"delete":{"tags":["identity.push_subscriptions"],"summary":"Stop notifying one browser.","description":"Your own row; or, by the hostname's own device naming its own hostname's key in `application_server_key` (400 `parameter_missing` otherwise), a row made on its own hostname, `metadata.device_id` that device, under that key, whose push service answered 404 or 410, an expired subscription (RFC 8030 section 7.3), its event written with no actor.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true},{"in":"query","name":"application_server_key","schema":{"description":"The VAPID public key, base64url: required of the hostname's device, the row's own key.","type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"},"description":"The VAPID public key, base64url: required of the hostname's device, the row's own key.","required":false}],"responses":{"200":{"description":"The row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.PushSubscription"}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/refresh_tokens":{"get":{"tags":["identity.refresh_tokens"],"summary":"List one page of the vendor grants of your tree, newest first.","description":"Each row is `client_id`, the hostname's vendor client the token was issued to, `iss` and `sub`, the account at the vendor that granted, and `data[\"ietf.org:scope\"]`, the scopes; after an import, `data[\"google.com:contactGroupResourceName\"]`, the one label, `data[\"google.com:syncToken\"]`, the hourly import's cursor, and `data[\"jedger.com:organization_id\"]`, where its cards go; after a calendar grant, `data[\"google.com:calendar\"]`, the mirror's `calendarId`, its `syncToken` (events.list) and the `jedger.com:organization_id` whose calendar_events it mirrors. The token is never answered.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false}],"responses":{"200":{"description":"A bare array of refresh_tokens.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/identity.RefreshTokenWithoutJwe"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/refresh_tokens/{id}":{"get":{"tags":["identity.refresh_tokens"],"summary":"Retrieve one vendor grant.","description":"Your own.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.RefreshTokenWithoutJwe"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"delete":{"tags":["identity.refresh_tokens"],"summary":"Revoke one vendor grant and remove its row.","description":"Tells Google to revoke the token (https://developers.google.com/identity/protocols/oauth2/web-server#tokenrevoke), then deletes the row. A token Google already counts dead, 400 `invalid_token`, is deleted too. Only on the hostname whose Google client the token was issued to. Only when the person asked.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.RefreshTokenWithoutJwe"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist. Or this hostname holds no key for a Google grant: `provider_unsupported`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"The token was issued to another hostname's Google client, or this hostname binds none: `conflict`. Only that hostname holds the key and the grant; revoke it there. This hostname's key no longer opens the token: `conflict`, the row stays; revoke it at https://myaccount.google.com/permissions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"502":{"description":"Google refused the revocation, or could not be reached: `bad_gateway`. The grant and the row stay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/service_tokens":{"get":{"tags":["identity.service_tokens"],"summary":"List one page of the service tokens of your tree, newest first.","description":"The rows carry neither the secret nor its `token_hash`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false}],"responses":{"200":{"description":"A bare array of service_tokens.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/identity.ServiceTokenWithoutTokenHash"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"post":{"tags":["identity.service_tokens"],"summary":"Mint a service token for an agent you minted, or for yourself when you are an agent.","description":"The answer carries `secret` beside the row, the one time it is ever shown, and the same secret on `Authentication-Info`; store it at once. A `user_id` outside your tree is 403, and so is a person's (`sub` equal to `act`): a service token is a machine's login, and a person signs in by passkey or OAuth.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ServiceTokenCreateRequest"}}}},"responses":{"201":{"description":"The row with `secret`.","headers":{"Authentication-Info":{"description":"`token=\"<secret>\"` (RFC 7615): the secret the body carries, shown this once.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ServiceTokenCreated"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. A `user_id` your session does not reach, or a person's: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/service_tokens/{id}":{"get":{"tags":["identity.service_tokens"],"summary":"Retrieve one service token of your tree, or sign in with its secret.","description":"With your JWT: the row, without the secret or its `token_hash`. With no JWT and the token's own secret as the bearer: the older service-token sign-in, kept until every caller names the user, `GET /users/{id}`'s twin: the row and a fresh user JWT on `Authentication-Info`. A device's JWT is read as a secret here, so it is 401.","security":[{"userJwt":[]},{"userJwtCookie":[]},{"serviceToken":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row.","headers":{"Authentication-Info":{"description":"`token=\"<user JWT>\", expires_in=<seconds>` (RFC 7615): on the sign-in alone, the JWT the secret bought.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ServiceTokenWithoutTokenHash"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"The sign-in: no JWT and no bearer, or a secret and id that open no session, a device's JWT and a `{id}` that is no UUID among them: `invalid_token`.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"patch":{"tags":["identity.service_tokens"],"summary":"Accepts an empty body only.","description":"`user_id` never changes after insert; there is nothing to change. The row's `sub` and `act` are copied again from its users row, and `service_token.updated` is written all the same.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ServiceTokenPatch"}}}},"responses":{"200":{"description":"The row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ServiceTokenWithoutTokenHash"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"delete":{"tags":["identity.service_tokens"],"summary":"Revoke a service token.","description":"Its secret signs in nobody from now on; a JWT it bought lives out its own expiry. Never revoke the token your jedgerd signs in with.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ServiceTokenWithoutTokenHash"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/authorization_grants":{"get":{"tags":["identity.authorization_grants"],"summary":"Find a pending CLI sign-in by its code, or list one page of the ones you answered, newest first.","description":"With `user_code`, typed with or without its hyphen in either case: the one live row of that code, pending or already yours. Without it: the rows you answered. A row past its life is never answered. A person's call: an agent may read a row by its code, and answers none (`PATCH` is 403).","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"user_code","schema":{"$ref":"#/components/schemas/identity.UserCode"},"required":false}],"responses":{"200":{"description":"A bare array of authorization_grants.","headers":{"Cache-Control":{"description":"`no-store`: a row is a sign-in in flight.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/identity.AuthorizationGrantWithoutCodeHash"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/authorization_grants/{id}":{"get":{"tags":["identity.authorization_grants"],"summary":"Retrieve a CLI sign-in you answered.","description":"A row past its life is 404.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row.","headers":{"Cache-Control":{"description":"`no-store`: a row is a sign-in in flight.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.AuthorizationGrantWithoutCodeHash"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"patch":{"tags":["identity.authorization_grants"],"summary":"Approve or deny a CLI sign-in.","description":"`{\"data\": {\"approved\": true}, \"user_code\": \"…\"}`; a pending row demands its `user_code`. Only on the person's own word: the CLI then holds their JWT. An agent is refused. Approving jedger's CLI's pending authorization code issues the code (RFC 6749 section 4.1.2): the answer carries it as `code`, once, with `Cache-Control: no-store`, and the identity site sends the browser to the row's `metadata.redirect_uri` with `code` and `metadata.state`; on a denial, with `error=access_denied` and `metadata.state` (section 4.1.2.1). That approval is made from the browser session alone: under `Authorization: Bearer` a pending authorization code is refused.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.AuthorizationGrantPatch"}}}},"responses":{"200":{"description":"The row after the answer, and `code` when the answer issued one.","headers":{"Cache-Control":{"description":"`no-store`, when the answer carries `code`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.AuthorizationGrantUpdated"}}}},"400":{"description":"The body is no JSON or off its schema, an unknown key or `metadata` among them: `invalid_request`, `param` the dotted path of the field when one field is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`. Or the row is jedger's CLI's pending authorization code and the request carries `Authorization: Bearer`: `forbidden`, since only the browser session consents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No live row has this `{id}`, the `{id}` is no UUID, or you neither answered the row nor presented its `user_code`: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}},"delete":{"tags":["identity.authorization_grants"],"summary":"Withdraw an answer before the CLI spends it.","description":"Answers the row as it stood. An agent is refused.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.AuthorizationGrantWithoutCodeHash"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row you answered has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row past its life that you answered and no insert has yet swept is deleted all the same, 200.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/authorize":{"get":{"tags":["identity.authorization_grants"],"summary":"The authorization endpoint (RFC 6749 section 3.1, PKCE by RFC 7636) of jedger's CLI and of the OpenID Provider's registered relying parties.","description":"`jedger login` opens it in the person's browser, and so does a relying party the row `REGISTERED_CLIENTS` registers (OpenID Connect Core 1.0 section 3.1.2), whose `redirect_uri` must equal one it registered, character for character (RFC 6749 section 3.1.2.3), whose `scope` must hold `openid`, and whose `nonce` the ID Token echoes; the code row then carries `scope` and `nonce`, and `/token` answers that client an `id_token`. Of `prompt`, `max_age`, `display`, `ui_locales`, `claims_locales` and `acr_values` only `prompt=none` is read: a relying party's with nobody signed in goes back as `error=login_required`; the rest are not read and never refused. `state` over 4,096 characters is 400 `invalid_request`, `param` `state`, never echoed; `scope` or `nonce` over 512 goes back as `error=invalid_request`. The person is the `user_jwt` cookie's alone: a request with `Authorization: Bearer` is answered as signed out. Signed out: 302 to the identity site's login card, `<IDENTITY_ORIGIN>/<language>/users?redirect_uri=<this URL>`, the language the first `Accept-Language` tag or `und`. Signed in as a person, for a relying party: one approved code row living `CODE_EXPIRES_IN` seconds, then 302 to `redirect_uri` with `code` and `state` and `Cache-Control: no-store`. For jedger's CLI, a public client any program on the machine can pose as (RFC 8252 section 8.6): one pending row bound to the person, living `CODE_EXPIRES_IN` seconds, holding `redirect_uri`, `code_challenge`, `state` and a `user_code`, then 302 to the page that asks the person, `<IDENTITY_ORIGIN>/<language>/users?user_code=XXXX-XXXX`, with `Cache-Control: no-store`; no code exists until the person approves it there (`PATCH /authorization_grants/{id}`). RFC 6749 section 4.1.2.1's refusals that may redirect do: 302 to `redirect_uri` with `error=unsupported_response_type` (a `response_type` other than `code`), `error=invalid_request` (no `code_challenge` of 43 base64url characters with `code_challenge_method=S256`), `error=access_denied` (an agent's session), `error=invalid_scope` (a relying party's `scope` without `openid`) or `error=server_error` (a relying party on a hostname with no `ID_TOKEN_SIGNING_KEY`, or a malformed one), `state` carried and `error_description` beside it. A row `REGISTERED_CLIENTS` that is malformed answers 500 `server_error`. Any other method is 405 `method_not_allowed` with `Allow: GET, HEAD`.","security":[],"parameters":[{"in":"query","name":"client_id","schema":{"type":"string","description":"`jedger-cli`, or a relying party's `client_id` in the row `REGISTERED_CLIENTS`."},"required":true,"description":"`jedger-cli`, or a relying party's `client_id` in the row `REGISTERED_CLIENTS`."},{"in":"query","name":"redirect_uri","schema":{"type":"string","description":"The CLI's loopback, `http://127.0.0.1:<port>/` or `http://[::1]:<port>/`, no userinfo, query or fragment, written exactly as the WHATWG URL serializer writes it, so `http://127.1:<port>/` or `HTTP://…` is refused (RFC 8252 section 7.3); a relying party's, one of its registered `redirect_uris` exactly."},"required":true,"description":"The CLI's loopback, `http://127.0.0.1:<port>/` or `http://[::1]:<port>/`, no userinfo, query or fragment, written exactly as the WHATWG URL serializer writes it, so `http://127.1:<port>/` or `HTTP://…` is refused (RFC 8252 section 7.3); a relying party's, one of its registered `redirect_uris` exactly."},{"in":"query","name":"scope","schema":{"description":"A relying party's: space-separated, holding `openid`. The CLI sends none.","type":"string"},"description":"A relying party's: space-separated, holding `openid`. The CLI sends none.","required":false},{"in":"query","name":"nonce","schema":{"description":"A relying party's: echoed unmodified in the ID Token (Core section 2).","type":"string"},"description":"A relying party's: echoed unmodified in the ID Token (Core section 2).","required":false},{"in":"query","name":"prompt","schema":{"description":"A relying party's: `none` asks for no user interface, answered `error=login_required` with nobody signed in; any other value is ignored.","type":"string"},"description":"A relying party's: `none` asks for no user interface, answered `error=login_required` with nobody signed in; any other value is ignored.","required":false},{"in":"query","name":"response_type","schema":{"type":"string","const":"code"},"required":true},{"in":"query","name":"code_challenge","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"required":true},{"in":"query","name":"code_challenge_method","schema":{"type":"string","const":"S256"},"required":true},{"in":"query","name":"state","schema":{"description":"Sent back as it came, at most 4,096 characters.","type":"string"},"description":"Sent back as it came, at most 4,096 characters.","required":false}],"responses":{"302":{"description":"302 to the login card, to the page that asks the person, or to `redirect_uri` with `code` or `error`.","headers":{"Location":{"description":"The login card, the page that asks the person for jedger's CLI, or `redirect_uri` with `code` and `state`, or with `error`.","schema":{"type":"string"}},"Cache-Control":{"description":"`no-store`, on the 302 that carries a `code` or a `user_code`.","schema":{"type":"string"}}}},"400":{"description":"The refusals that must not redirect (RFC 6749 section 4.1.2.1): a `client_id` that is neither `jedger-cli` nor a registered relying party's, no `redirect_uri`, one longer than 2,048 characters, one the client did not register (the CLI's loopback; a relying party's exact `redirect_uris`), or a `state` over 4,096 characters: `invalid_request`, `param` naming it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"jedger's CLI's sign-in started by another site, `Sec-Fetch-Site` other than `same-origin`, `same-site` or `none`: `forbidden`, told to the person. A relying party's request is cross-site by design and is not refused for it; its own start door refuses a start another site submits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"500":{"description":"`REGISTERED_CLIENTS` malformed: `server_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/device_authorization":{"post":{"tags":["identity.authorization_grants"],"summary":"jedger's CLI's device authorization endpoint (RFC 8628 section 3.1).","description":"The body is `application/x-www-form-urlencoded`, `client_id=jedger-cli` (a `scope` is ignored). Answers 200 RFC 8628 section 3.2's `device_code`, `user_code` (`XXXX-XXXX`), `verification_uri` (`<IDENTITY_ORIGIN>/<language>/users`), `verification_uri_complete`, `expires_in` (`DEVICE_CODE_EXPIRES_IN`) and `interval` (5). A hostname whose `DEVICE_CODE_EXPIRES_IN` is no positive whole number answers 500 `server_error`. Any other method is 405 `method_not_allowed` with `Allow: POST`.","security":[],"responses":{"200":{"description":"The device request's codes.","headers":{"Cache-Control":{"description":"`no-store`, with `Pragma: no-cache` (RFC 6749 section 5.1). On the answer alone, never on a refusal.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"device_code":{"type":"string"},"user_code":{"type":"string"},"verification_uri":{"type":"string"},"verification_uri_complete":{"type":"string"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"additionalProperties":false}}}},"400":{"description":"A body that is not form-encoded: `invalid_request`. A `client_id` other than `jedger-cli`: `invalid_client`, `param` `client_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"500":{"description":"`DEVICE_CODE_EXPIRES_IN` no positive whole number: `server_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/token":{"post":{"tags":["identity.authorization_grants"],"summary":"The token endpoint (RFC 6749 section 3.2): spend a code, or a passkey's assertion, for a user JWT.","description":"The body is `application/x-www-form-urlencoded`, in one of three grants. jedger's CLI's two take `client_id=jedger-cli`: `grant_type=authorization_code`, `code`, `redirect_uri` and `code_verifier` (RFC 7636 section 4.5), or `grant_type=urn:ietf:params:oauth:grant-type:device_code` and `device_code` (RFC 8628 section 3.4); the one statement deletes the row it spends, so a code is single-use, and the JWT's `auth_time` is the answering person's. A person's browser signs in with a passkey by `grant_type=urn:jedger:params:oauth:grant-type:webauthn`, an extension grant (RFC 6749 section 4.5), with no `client_id` and `authn_response`, the JSON text of the assertion's `credential.toJSON()` (W3C's `AuthenticationResponseJSON`, https://www.w3.org/TR/webauthn-3/#dictdef-authenticationresponsejson; Auth0's parameter name, https://auth0.com/docs/native-passkeys-api), answering the challenge `GET /passkeys` planted: verified, the person is healed into this hostname's organization, a failed heal being logged and the sign-in standing, the answer adds `Set-Cookie` `user_jwt` and clears `webauthn_challenge`, and the sign-in's event follows (Not for agents, above). The CLI's grants and the webauthn grant answer 200 `{ access_token, token_type: \"Bearer\", expires_in, sub, act }`, the user JWT and its lifetime `USER_EXPIRES_IN`. A relying party the row `REGISTERED_CLIENTS` registers sends `Authorization: Basic` over its form-urlencoded `client_id` and secret (`client_secret_basic`, RFC 6749 section 2.3.1) and `grant_type=authorization_code`, `code`, `redirect_uri` and `code_verifier`; the secret's SHA-256 must equal the registered hash, and the code is spent by the same single-use statement under its `client_id`. It is answered OpenID Connect Core section 3.1.3.3's `{ access_token, token_type: \"Bearer\", expires_in, id_token }`: `id_token` an RS256 JWT, `kid` the JWK Set's, `iss` `<API_ORIGIN>/identity/v1`, `sub` the users row id, `aud` the `client_id`, `iat`, `exp` `ID_TOKEN_EXPIRES_IN` seconds on, `auth_time` the session's sign-in, `nonce` the authorization request's when it sent one; `access_token` 32 random bytes that no door accepts and nothing stores, there being no UserInfo endpoint; `expires_in` `ID_TOKEN_EXPIRES_IN`. A hostname whose `REGISTERED_CLIENTS` is malformed, or that registers a client but holds no valid `ID_TOKEN_SIGNING_KEY` or `ID_TOKEN_EXPIRES_IN`, answers 500 `server_error` before any code is spent. Any other method is 405 `method_not_allowed` with `Allow: POST`.","security":[],"responses":{"200":{"description":"The user JWT as an OAuth access token response; to a relying party, the ID Token response.","headers":{"Cache-Control":{"description":"`no-store`, with `Pragma: no-cache` (RFC 6749 section 5.1). On the answer and on every refusal but the 405.","schema":{"type":"string"}},"Set-Cookie":{"description":"The webauthn grant alone: `user_jwt`, the session, and `webauthn_challenge` cleared, the latter on its refusals too.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sub":{"type":"string"},"act":{"type":"string"}},"required":["access_token","token_type","expires_in","sub","act"],"additionalProperties":false},{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id_token":{"type":"string"}},"required":["access_token","token_type","expires_in","id_token"],"additionalProperties":false}]}}}},"400":{"description":"Not form-encoded, or a field missing: `invalid_request`. `client_id` neither `jedger-cli` nor a registered client's, with no `Authorization`: `invalid_client`. A relying party's request with `client_secret` in the body beside its header: `invalid_request`; a `grant_type` other than `authorization_code` from one: `unsupported_grant_type`. An unknown `grant_type`, or the webauthn grant on a hostname whose `SUPPORTED_IDENTITY_PROVIDERS` lists no `passkey` (that row absent or malformed answers 500 `server_error`): `unsupported_grant_type`. A malformed `code_verifier`, or a code unknown, spent, not matching, expired (an authorization code) or naming no user: `invalid_grant`. A device code: `authorization_pending` (poll again), `access_denied` (the person denied), `expired_token`. The webauthn grant: an `authn_response` that is no assertion, `invalid_request`; no `webauthn_challenge` cookie, or one not signed by this hostname, altered or expired, `passkey_challenge_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"A relying party's client authentication failed, its `Authorization: Basic` not decoding, naming no registered client, its secret's hash not the registered one, or a registered `client_id` sent with no header: `invalid_client`, with `WWW-Authenticate: Basic realm=\"<API_ORIGIN>/identity/v1\"` (RFC 6749 section 5.2). The webauthn grant: no passkey has the assertion's credential id, `passkey_credential_unknown`; the user handle names another user, the signature does not verify, a nonzero counter did not go up, or the user is gone, `passkey_verification_failed`.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"The webauthn grant: Your JWT is an agent's, its `sub` not its `act.sub`: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"500":{"description":"`SUPPORTED_IDENTITY_PROVIDERS` or `REGISTERED_CLIENTS` malformed, or a registered client's hostname holding no valid `ID_TOKEN_SIGNING_KEY` or `ID_TOKEN_EXPIRES_IN`: `server_error`, before any code is spent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/events":{"get":{"tags":["identity.events"],"summary":"List one page of your tree's events, newest first.","description":"`limit` is 1 to 100; absent, 100; page with `starting_after` (the last id you hold) or `ending_before` (the first), never both. A page shorter than `limit` is the last. `metadata[object_id]` narrows to the events of one row by its id, a deleted row's included. Narrow to a range of `event_at` with `event_at[gte]` (inclusive) and `event_at[lt]` (exclusive). The read writes one `events.listed` event in the same statement.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/identity.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"metadata","schema":{"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","type":"object","properties":{"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false},"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","required":false,"style":"deepObject","explode":true},{"in":"query","name":"event_at[gte]","schema":{"$ref":"#/components/schemas/identity.DateTime"},"required":false},{"in":"query","name":"event_at[lt]","schema":{"$ref":"#/components/schemas/identity.DateTime"},"required":false}],"responses":{"200":{"description":"A bare array of events.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/identity.Event"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/identity/v1/events/{id}":{"get":{"tags":["identity.events"],"summary":"Retrieve one event.","description":"`metadata.object_id` is the row it is about, kept after that row is deleted. A read that reaches the row writes one `event.retrieved` event in the same statement.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/identity.Uuid"},"required":true}],"responses":{"200":{"description":"The event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.Event"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"404":{"description":"No row of your tree has this `{id}`, or the `{id}` is no UUID: `resource_missing`. A row you do not reach is answered the same as one that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity.ApiErrorBody"}}}}}}},"/conversation/v1/openapi.json":{"get":{"tags":["conversation.openapi"],"summary":"This document.","description":"Public, the same for every caller of one hostname. Any method but GET and HEAD is 405 `method_not_allowed` with `Allow: GET, HEAD`.","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","headers":{"Cache-Control":{"description":"public, max-age=300","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string","const":"3.1.0"}},"required":["openapi"],"additionalProperties":{}}}}},"405":{"description":"A method but GET and HEAD: `method_not_allowed`, with `Allow: GET, HEAD`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/threads":{"get":{"tags":["conversation.threads"],"summary":"List the threads your memberships reach, newest message first.","description":"Narrow with `organization_id`, `metadata[schema.org:keywords]` and `metadata[membership_id]=<membership id>`, the threads whose list of participants holds that membership. `status=active` asks `organization_id` beside it and keeps your own threads there, those whose list holds your membership, still within their silence: the thread to continue. One page, newest first by `metadata.schema.org:dateModified`, then by id: `limit` 1 to 100, 100 when absent, and `starting_after` the last thread you hold for the threads after it in that order, `ending_before` the first for those before it. `expand=messages` adds `messages` to each thread, `[{ id, thread_id, parts }]`: the newest message you may read, its `parts` the first text part alone with its text cut, or `[]` when you may read none.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"metadata","schema":{"type":"object","properties":{"schema.org:keywords":{"type":"string","minLength":1,"externalDocs":{"url":"https://schema.org/keywords"}},"membership_id":{"description":"Stripe's metadata form: `metadata[membership_id]=<membership id>`, the threads whose list of participants holds that membership. One `@>` on the GIN index.","$ref":"#/components/schemas/conversation.Uuid"}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true},{"in":"query","name":"status","schema":{"type":"string","const":"active"},"required":false},{"in":"query","name":"expand","schema":{"default":[],"x-jedger.com:filter":false,"type":"array","items":{"type":"string","enum":["messages"]}},"required":false}],"responses":{"200":{"description":"A bare array of threads.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/conversation.ListedThreads"}}}}},"400":{"description":"A query parameter refused, how each is named below. `status` without `organization_id` is refused on `organization_id`. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"post":{"tags":["conversation.threads"],"summary":"Open a thread, optionally with its first message.","description":"The door mints `id`, `message.id` and each file's `id` when absent. A thread `id` you send is the open's idempotency key: a resend of one you already hold writes nothing and sends nothing again, and answers 200 with the thread as it stands, its first message inline as `message` when the resend names one. A resend that carries `message` names the `message.id` the first send wrote: a `message` with no `id` or with another is 403 `forbidden`, nothing written.\n\nThe thread's list, `metadata.membership_id`, is your membership in `organization_id` first, then every membership `membership_id` names, then, when you, a person or a device, name a back office, the organization's one front office, then the device memberships that hold the thread's sockets: the device named by the first named membership whose card names one, then the hostname's holder, each only when it holds a membership in the organization. Every one must be a membership of the thread's organization, and you must hold one there yourself, else 403 `forbidden` and nothing is written.\n\nA device's JWT opens a thread as a person's does, with no `message`, its own membership in `organization_id` found by its `device_id`; with `message` it is 403 `user_required`, since a device writes only a client-reported turn (`POST /messages`), never a thread's first message. Its list puts the devices that hold the thread's sockets first, then the device's own membership, then the rest in the order above, so the device never holds the thread's sockets.\n\nA caller, a person, an agent or a device, who holds no `back_office` post may name offices alone beside their own membership, an office being a membership whose card names a model; another person's membership is 403 `forbidden`, with no `param`, before anything is written. A holder of the `back_office` post may name anyone.\n\nWith `message`, the first message and its files are written in the same statement, held to the messages door's caps (at most 5 files; a told `size` at most 268435456 bytes), and its life after the write is the messages door's (`POST /messages`): the answer is 201 with the thread and the message inline as `message`, or, when the thread's front office answers the words by the rule of `POST /messages`, its answer streamed. Without `message` the answer is 201 with the thread.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"membership_id":{"type":"array","items":{"$ref":"#/components/schemas/conversation.Uuid"}},"data":{"type":"object","properties":{"schema.org:name":{"type":"string","minLength":1,"externalDocs":{"url":"https://schema.org/name"}},"schema.org:abstract":{"type":"string","minLength":1,"externalDocs":{"url":"https://schema.org/abstract"}}},"additionalProperties":false},"message":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"parts":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":200000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"file"},"url":{"type":"string","minLength":1,"maxLength":2000000,"pattern":"^(?:\\/conversation\\/v1\\/attachments\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|data:(?:text\\/vtt|application\\/json);base64,[A-Za-z0-9+/]*={0,2}$)"}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","const":"data-schema.org:Action"},"data":{"type":"object","properties":{"@type":{"type":"string","enum":["ConfirmAction","CancelAction"]},"name":{"type":"string","minLength":1,"maxLength":80},"actionStatus":{"type":"string","enum":["PotentialActionStatus","CompletedActionStatus","FailedActionStatus"]},"object":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":["@type","name","actionStatus"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"}},"attachments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"filename":{"anyOf":[{"type":"string","maxLength":998},{"type":"null"}]},"media_type":{"$ref":"#/components/schemas/conversation.MediaType"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"multipart":{"type":"boolean"}},"required":["filename","media_type"],"additionalProperties":false}},"metadata":{"type":"object","properties":{"ietf.org:to":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/conversation.Uuid"},"externalDocs":{"url":"https://www.rfc-editor.org/rfc/rfc8621#section-4.1.3"}}},"required":["ietf.org:to"],"additionalProperties":false}},"required":["parts"],"additionalProperties":false}},"required":["organization_id"],"additionalProperties":false}}}},"responses":{"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. An `id` or a `message.id` dated more than 5 minutes ahead of the server's clock is `invalid_request`, `param` naming it. More than 5 files is `attachments_too_many`, `param` `message.attachments`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. A device's JWT with `message`: `user_required`. Your memberships do not allow this row to be created: `forbidden`, with no `param`; nothing is written. A membership outside the organization, no membership of your own there, or, for a caller who holds no `back_office` post, a named membership that is no office: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"A body past 3145728 bytes, this door's own ceiling: `payload_too_large`. A file whose told `size` passes 268435456 bytes: `attachment_too_large`, `param` `message.attachments`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"429":{"description":"With a `message` alone: You are a guest of the organization and, since UTC midnight on this hostname, you have written `MESSAGES_PER_DAY` messages, or this write's files would pass `ATTACHMENTS_PER_DAY`: `rate_limit`, `Retry-After` in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"503":{"description":"With a `message` alone: This hostname states no `MESSAGES_PER_DAY` or no `ATTACHMENTS_PER_DAY` a counted write needs: `service_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"2XX":{"description":"201, the thread written, with `message` inline when the open carried one; 200, a resend, the thread as it stands; or the front office's answer streamed, `Content-Type: text/event-stream` and `x-vercel-ai-ui-message-stream: v1`, the AI SDK's UI message stream (https://ai-sdk.dev/docs/ai-sdk-ui/stream-protocol). The answer is written as a message, role `assistant`, the front office its speaker, when the stream ends, and whole even when you leave it; the model's reasoning streams only when your `users.data.conversation.reasoning` is true, and is never stored.","headers":{"Server-Timing":{"description":"On the 201 and the stream, not on a resend's 200: each step's milliseconds, `<step>;dur=<ms>` (W3C Server Timing, https://www.w3.org/TR/server-timing/#the-server-timing-header-field).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ThreadCreated"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/threads/{id}":{"get":{"tags":["conversation.threads"],"summary":"Retrieve one thread.","description":"`expand=messages` adds one page of its messages, as `GET /messages?thread_id=` answers them, paged by `limit`, `starting_after` and `ending_before`; `expand=actions` adds its open actions your memberships reach and its newest run (`ReplyAction`) whatever its status, a run's with its chat state. Repeat `expand` for both.\n\nWith an `Origin` header (RFC 6454), when the thread has a holder (the first device membership its list names, else the hostname's holder) and the hostname holds the fleet's signing key with its `kid`, the answer also carries `websocket_url` and `audience`, with `Cache-Control: no-store`. `websocket_url` is the thread's socket, `wss://` on the holder's host, with a signed ticket in its query as `access_token` (RFC 6750 section 2.3), which lives the hostname's `ACCESS_TOKEN_EXPIRES_IN` seconds; a client also offers the ticket as the subprotocol `bearer.authorization.jedger.com.<ticket>` beside `conversation.messages` (RFC 6455 section 1.9), and will leave it out of the address once every holder reads it there. `audience` is the ticket's `aud` (RFC 7519 section 4.1.3): every holder's roads in the order to try them, for each holder `device-<id>.<zone>`, the Cloudflare tunnel, then `caddy-device-<id>.<zone>`, a DNS-only record of its own address answered by its own Caddy. A client whose handshake fails on one road opens the same path and ticket on the next. Without them the answer is the thread alone.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true},{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"expand","schema":{"anyOf":[{"type":"array","items":{"type":"string","enum":["messages","actions"]}},{"type":"string","enum":["messages","actions"]}]},"required":false},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/conversation.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false},{"name":"Origin","in":"header","required":false,"description":"The page's origin (RFC 6454), which the holder checks the socket against; with it the answer carries `websocket_url` and `audience`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The thread; with `expand`, `messages` and `actions` beside its columns; with `Origin`, `websocket_url` and `audience`.","headers":{"Cache-Control":{"description":"`no-store` when the answer carries `websocket_url`, a bearer ticket (RFC 6749 section 5.1).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.RetrievedThread"}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"patch":{"tags":["conversation.threads"],"summary":"Retitle, summarize, group or hand over a thread, or swap its list.","description":"`data` merges shallowly, a null removing a key: `schema.org:name`, `schema.org:abstract`. `schema.org:keywords` replaces the group, a null or an empty list removing it; `schema.org:duration` replaces the silence, a null removing it; `w3.org:audience: \"support\"` lets every holder of the post named `support` read and answer it, a null removing it, and only a caller whose policy names that value under `ResourceTag/w3.org:audience` sets, changes or removes it. A change of the audience or of the list rewrites the copies that differ on the thread's messages and attachments, and of the list on its actions, each with its `.updated` event.\n\n`membership_id`, standing alone, replaces the whole list. Every membership it names must be one of the thread's organization, else nothing is written, 404. A caller, a person or an agent, who holds no `back_office` post may name, beyond their own membership and those the thread already lists, offices alone, an office being a membership whose card names a model; any other is 403 `forbidden`, `param` `membership_id`. The rule judges a caller who holds no membership in the thread's organization too, who reaches the thread through its UPDATE policy alone. Those the thread already lists may stay, since the swap is how a person changes the thread's back office. A holder of the `back_office` post may name anyone; an agent's swap is judged by its policy alone.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"schema.org:name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"externalDocs":{"url":"https://schema.org/name"}},"schema.org:abstract":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"externalDocs":{"url":"https://schema.org/abstract"}}},"additionalProperties":false},"schema.org:keywords":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}],"externalDocs":{"url":"https://schema.org/keywords"}},"schema.org:duration":{"anyOf":[{"type":"string","pattern":"^P(?:(?:\\d+D|\\d+M(?:\\d+D)?|\\d+Y(?:\\d+M(?:\\d+D)?)?)(?:T(?:\\d+H(?:\\d+M(?:\\d+S)?)?|\\d+M(?:\\d+S)?|\\d+S))?|T(?:\\d+H(?:\\d+M(?:\\d+S)?)?|\\d+M(?:\\d+S)?|\\d+S)|\\d+W)$"},{"type":"null"}],"externalDocs":{"url":"https://schema.org/duration"}},"w3.org:audience":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"externalDocs":{"url":"https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience"}},"membership_id":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/conversation.Uuid"}}},"additionalProperties":false}}}},"responses":{"200":{"description":"The thread as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Thread"}}}},"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. `membership_id` beside another key is refused on `membership_id`; an empty patch is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. A person who holds no `back_office` post named a membership that is no office and is not already listed: `forbidden`, `param` `membership_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`. A swap naming a membership outside the thread's organization writes nothing and answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"delete":{"tags":["conversation.threads"],"summary":"Delete a thread with its messages, attachments and actions.","description":"Its attachments, its messages, its actions, then the thread, in one statement, each row deleted writing its `.deleted` event; the objects stay in the bucket.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"responses":{"200":{"description":"The thread as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Thread"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/messages":{"get":{"tags":["conversation.messages"],"summary":"List one page of messages, newest first.","description":"`thread_id` keeps one thread's, `organization_id` one organization's. Each message carries `name`, its speaker's name on the organization's card, and `attachments` when it carried files.\n\nWith `Upgrade: websocket` (RFC 6455) and `thread_id`, the same GET opens a socket instead, answered 101, your credential on the handshake as on any call: `Authorization: Bearer`, or a browser's cookie. A handshake whose `Origin` this hostname does not admit, by the rule of the hub's CORS answer, is 403 `forbidden` before anything is read: a device's own hostname and `null` never are (RFC 6455 section 10.2, https://datatracker.ietf.org/doc/html/rfc6455#section-10.2). A handshake with no `Origin` stands: a browser always sends one (https://fetch.spec.whatwg.org/#append-a-request-origin-header), so that caller is a program holding its own credential. Through the hub the handshake's answer has 5 seconds, then 504 `gateway_timeout`.\n\nWith `Sec-WebSocket-Protocol: conversation.messages` it is the thread's stream, forwarded to the thread's first device holder (else the hostname's holder), which sends one text frame per row of the thread, a message, an attachment or a run, as its door writes it, and reads nothing: 404 when you may not read the thread, 503 `service_unavailable` when the hostname holds no key to sign the forward or the device answers no socket within 4 seconds, a refusal of the forward included. A page reads `websocket_url` on `GET /threads/{id}` and opens that instead, no Worker on its path.\n\nAn upgrade without that subprotocol is 400 `invalid_request`: the live voice turn is the client's own socket to the AI Gateway, minted by `POST /conversation/v1/vercel`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"thread_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"name":"Upgrade","in":"header","required":false,"description":"`websocket` opens a socket (RFC 6455 section 4.1, https://datatracker.ietf.org/doc/html/rfc6455#section-4.1) instead of the list.","schema":{"type":"string"}},{"name":"Sec-WebSocket-Protocol","in":"header","required":false,"description":"`conversation.messages` asks the thread's stream.","schema":{"type":"string"}}],"responses":{"200":{"description":"A bare array of messages; with `Upgrade: websocket`, 101 and the socket.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/conversation.ListedMessages"}}}}},"400":{"description":"A query parameter refused, how each is named below. A socket with no `thread_id` is refused on `thread_id`; an upgrade without `conversation.messages`. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. A socket's handshake with an `Origin` this hostname does not admit: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"A socket's thread does not exist or your memberships do not allow you to read it: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"503":{"description":"The stream: the hostname holds no key to sign the forward, or the thread's holder answered no socket within 4 seconds: `service_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"post":{"tags":["conversation.messages"],"summary":"Write a message in a thread.","description":"Send an `id` only to make the write idempotent; without one the door mints it, and each file's. `attachments` writes the files' rows in the same statement; `multipart: true` opens each upload, its `upload_id` in the answer, and the bytes go to `PATCH /attachments/{id}`. You speak through your membership in the thread's organization; with none the write is 403. The write puts that membership in the thread's list when it is not there, and, in a thread a person opened whose list holds a back office, a person's message puts the organization's front office there too; it moves the thread's `schema.org:dateModified` to the message's time.\n\nThe thread's front office answers, streamed, when all of these hold, and otherwise the answer is the 201: the message carries no `attachments` and a text part with words; your credential is a person's, its `sub` your own id and no agent's; your `users.data.conversation.front_office` is not false; you are no holder of the `support` post in a thread you did not open; the thread's list holds the organization's front office, the holder of its `front_office` post whose card names `ai-sdk.dev:model`; and the AI Gateway types that model `language`.\n\nA message's words and files leave by mail in one case alone, the deliberate send: `metadata[\"ietf.org:to\"]` names the memberships to mail it to, your policy judging the key's presence; when its text links a support action you may read (`/actions/{id}` tagged `jedger.com:support`), every holder of the `support` post is mailed too, you excepted. A reply from an address it reached folds into this thread. A message with multipart files is mailed when the last of them completes. Any other message, in a thread that came by mail, sends its newest mail's verified sender the fixed notice of a new message and nothing of its own (the document's description); a front office's answer sends nothing. After the mail, `metadata[\"ietf.org:delivery\"]` holds one entry per recipient in RFC 3464's per-recipient fields (https://www.rfc-editor.org/rfc/rfc3464#section-2.3): `Final-Recipient` (`rfc822;<address>`), `Action` (`delivered` or `failed`), `Diagnostic-Code` (Email Sending's error code, or `no_from` / `no_address` when nothing was sent) and `membership_id`. Read it to know who got a message you named under `ietf.org:to`.\n\nA client-reported row is one turn of a live voice session you talked yourself on a client secret from `POST /conversation/v1/vercel`, and the one body a device's JWT may send here. It holds `metadata[\"jedger.com:client_reported\"]` `true` and `role`, `user` for the person's or the device's transcript, written under your membership, `assistant` for the front office's answer, written under the organization's front office, which you never name; `usage` on an assistant's row is the provider's usage object you read on the socket, logged and stored nowhere. On an assistant's row alone, `metadata[\"ai-sdk.dev:outcome\"]` `aborted` says the answer was stopped and `parts` hold the words said before it stopped; on any other row it is 400 `invalid_request`, `param` `metadata`. `parts` are text parts with words, nothing else, and it carries no `attachments` and no `ietf.org:to`: otherwise 400 `invalid_request`. Your membership must stand in the thread's list already; an assistant's row also needs the front office in that list and a client secret you minted for this thread in the last 30 minutes: otherwise 403 `forbidden`. Without the key a device's JWT is 403 `user_required`. The answer is the 201 with the row, never a stream: no model is called, since the row was answered on your socket. The decision model judges it and a user's row may wake the back office, an assistant's never; a model reading the thread later reads an assistant's row as your unverified report, never as its own turn. It reaches the thread's devices and its people's notifications, and it is mailed to nobody. No audio is sent or stored. Post one row at a time, in the order said; send an `id` only if you may retry, and one dated more than 30 minutes behind the server's clock is 400 `invalid_request`, `param` `id`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"thread_id":{"$ref":"#/components/schemas/conversation.Uuid"},"parts":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":200000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"file"},"url":{"type":"string","minLength":1,"maxLength":2000000,"pattern":"^(?:\\/conversation\\/v1\\/attachments\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|data:(?:text\\/vtt|application\\/json);base64,[A-Za-z0-9+/]*={0,2}$)"}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","const":"data-schema.org:Action"},"data":{"type":"object","properties":{"@type":{"type":"string","enum":["ConfirmAction","CancelAction"]},"name":{"type":"string","minLength":1,"maxLength":80},"actionStatus":{"type":"string","enum":["PotentialActionStatus","CompletedActionStatus","FailedActionStatus"]},"object":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":["@type","name","actionStatus"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"}},"role":{"type":"string","enum":["user","assistant"]},"usage":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"attachments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"filename":{"anyOf":[{"type":"string","maxLength":998},{"type":"null"}]},"media_type":{"$ref":"#/components/schemas/conversation.MediaType"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"multipart":{"type":"boolean"}},"required":["filename","media_type"],"additionalProperties":false}},"metadata":{"type":"object","properties":{"ietf.org:to":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/conversation.Uuid"},"externalDocs":{"url":"https://www.rfc-editor.org/rfc/rfc8621#section-4.1.3"}},"jedger.com:client_reported":{"type":"boolean","const":true,"description":"jedger's own key (jedger.com): the messages comment says what it is."},"ai-sdk.dev:outcome":{"type":"string","const":"aborted","externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}}},"additionalProperties":false}},"required":["thread_id","parts"],"additionalProperties":false}}}},"responses":{"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. An `id` dated more than 5 minutes ahead of the server's clock is `invalid_request`, `param` naming it. A client-reported row's `id` dated more than 30 minutes behind the same. More than 5 files is `attachments_too_many`, `param` `attachments`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your memberships do not allow this row to be created: `forbidden`, with no `param`; nothing is written. No thread has this `thread_id`, you may not write in it, or you hold no membership in its organization: the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"A body past 3145728 bytes, this door's own ceiling: `payload_too_large`. A file whose told `size` passes 268435456 bytes: `attachment_too_large`, `param` `attachments`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"429":{"description":"You are a guest of the organization and, since UTC midnight on this hostname, you have written `MESSAGES_PER_DAY` messages, or this write's files would pass `ATTACHMENTS_PER_DAY`: `rate_limit`, `Retry-After` in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"503":{"description":"This hostname states no `MESSAGES_PER_DAY` or no `ATTACHMENTS_PER_DAY` a counted write needs: `service_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"2XX":{"description":"201, the message written, with `attachments` when it carried files; 200, a resend of the same id; or the front office's answer streamed, `Content-Type: text/event-stream` and `x-vercel-ai-ui-message-stream: v1`, the AI SDK's UI message stream (https://ai-sdk.dev/docs/ai-sdk-ui/stream-protocol). The answer is written as a message, role `assistant`, the front office its speaker, when the stream ends, and whole even when you leave it; the model's reasoning streams only when your `users.data.conversation.reasoning` is true, and is never stored.","headers":{"Server-Timing":{"description":"On the 201 and the stream, not on a resend's 200: each step's milliseconds, `<step>;dur=<ms>` (W3C Server Timing, https://www.w3.org/TR/server-timing/#the-server-timing-header-field).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.MessageCreated"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/vercel":{"post":{"tags":["conversation.messages"],"summary":"Mint a client secret for a live voice session on the AI Gateway.","description":"The live voice turn: you talk to the AI Gateway yourself, a browser or a device alike, and this door only judges you and mints. Name the thread, `?thread_id=<id>`, with your credential on the call, a browser's cookie, a user JWT, or a device's JWT as `Authorization: Bearer`, bought at `GET /artifact/v1/devices/{id}` with its service token's secret and read from the answer's `Authentication-Info`. No body. The thread must be one your policy admits, your membership in its list, its list holding the organization's front office, whose card names `ai-sdk.dev:realtime`, a model the gateway types `realtime`. Anyone in the thread may mint. The answer is `no-store`.\n\n1. Open `url` within 60 seconds, once: the token is single use and locked to `model`, and the gateway refuses it past its life or on another model's address. Send `Sec-WebSocket-Protocol: ai-gateway-realtime.v1, ai-gateway-auth.<token>`, about 760 bytes, and neither `Authorization` nor `Origin` from a program; the server selects `ai-gateway-realtime.v1`. A browser passes the two as `new WebSocket`'s protocols. Vercel's page: https://vercel.com/docs/ai-gateway/modalities/realtime.\n\n2. Your first frame is `session`, verbatim, as text. The gateway sends nothing before a first client frame and closes after 30 seconds without one.\n\n3. Send audio as `{\"type\":\"input-audio-append\",\"audio\":\"<base64 PCM16 little-endian mono 16 kHz>\"}`, at most 256 KB a frame; a quarter second a frame is what the site sends. The gateway's voice detection ends a turn. On `google/gemini-3.8-live`, `response-create` with no audio before it gets no answer.\n\n4. The frames you hear are JSON text, the AI SDK's realtime server events (https://ai-sdk.dev/docs/ai-sdk-core/realtime): `session-created`; `custom`, whose `raw.voiceActivity.type` is `ACTIVITY_START` or `ACTIVITY_END`; `input-transcription-completed` with `transcript`; `audio-delta` with `delta`, base64 PCM16 mono 24 kHz, and `raw` holding the same audio again, so 20,480 characters of `delta` is about 41 KB of frame; `audio-transcript-delta` with `delta`; `audio-done`; `audio-transcript-done` with `transcript`; `response-done`; `error` with `message`. `raw.usageMetadata` on a frame is the provider's usage: keep the newest.\n\n5. Record each turn at `POST /conversation/v1/messages`, one post at a time in the order said, with the credential you minted with: the person's words, `{\"thread_id\":\"<id>\",\"role\":\"user\",\"parts\":[{\"type\":\"text\",\"text\":\"<transcript>\"}],\"metadata\":{\"jedger.com:client_reported\":true}}`, once per utterance, since `input-transcription-completed` repeats during one, each frame holding all the words so far: hold the newest and post it at `response-done` or the close, or before words that do not extend it; at `response-done`, after them, the same with `role` `assistant`, the answer's transcript and `usage`, the newest usage object; an answer you stopped also holds `\"ai-sdk.dev:outcome\":\"aborted\"` in `metadata`, with the words said before it stopped. Post no empty text. Send no audio.\n\nA session ends at 25 minutes or 5 minutes idle, a message over 256 KB is rejected, a team has a limit on concurrent sessions, and a session never resumes (https://vercel.com/docs/ai-gateway/modalities/realtime#session-limits). To go on, mint again.\n\nYour limits, counted across every thread from your credential's `sub`, so a person and the agents they minted share one count: a new mint about a minute after the last, and `CLIENT_SECRETS_PER_DAY` in any 24 hours, a row on the hostname's device; and `CLIENT_SECRETS_PER_HOSTNAME_PER_DAY` in any 24 hours for everyone on this hostname together. Beyond any: 429 `rate_limit` with `Retry-After` in seconds. Stopping and pressing again within the minute is refused the same, so wait for it. One session at a time is only this window, since this door never sees a socket close.\n\nThe language line names your own language setting, `openid.net:locale`: a person's on their `identity.users` row, a device's on its `artifact.devices` row, which its device JWT carries, so a change reaches a device's next JWT.\n\nWhat the token does not lock. The gateway keeps a session's configuration on the client's side, so `session.config.instructions` is in this answer: the front office card's instructions, the date and language lines, and of what the organization remembers only the memory pages your own policy lets you read. A client that sends other instructions is obeyed. A dishonest holder of the credential can hold one session per mint on `model` alone, with any instructions, speech or typed text, for jedger's AI Gateway credit, up to 25 minutes each, so up to 25 at once at one a minute and within the daily number, taking the team's concurrent limit from others; and for 30 minutes after each mint write rows under the front office's membership with words the model never said, each marked `jedger.com:client_reported`, which wake no back office and which a model reads as that holder's report. It cannot reach another model, another thread's rows or any other door.","parameters":[{"in":"query","name":"thread_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"responses":{"201":{"description":"201: `token`, single use; `url`, the socket's address; `expiresAt`, the token's end for opening, Unix seconds; `model`, what it is locked to; `session`, your first frame.","headers":{"Cache-Control":{"description":"`no-store`, OAuth's rule for a token's answer (RFC 6749 section 5.1, https://datatracker.ietf.org/doc/html/rfc6749#section-5.1).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"url":{"type":"string"},"expiresAt":{"type":"number"},"model":{"type":"string"},"session":{"type":"object","properties":{"type":{"type":"string","const":"session-update"},"config":{"type":"object","properties":{"instructions":{"type":"string"},"inputAudioFormat":{"type":"object","properties":{"type":{"type":"string","const":"audio/pcm"},"rate":{"type":"number","const":16000}},"required":["type","rate"],"additionalProperties":false},"inputAudioTranscription":{"type":"object","properties":{},"additionalProperties":false},"outputAudioTranscription":{"type":"object","properties":{},"additionalProperties":false}},"required":["instructions","inputAudioFormat","inputAudioTranscription","outputAudioTranscription"],"additionalProperties":false}},"required":["type","config"],"additionalProperties":false}},"required":["token","url","model","session"],"additionalProperties":false}}}},"400":{"description":"No `thread_id` is `parameter_missing`, one that is no UUID `invalid_request`, each `param` `thread_id`; any other query key is `parameter_unknown`, `param` that key. Your `conversation.front_office` option is off: `invalid_request`. The thread's list holds no front office naming a realtime model: `invalid_request`, `param` `thread_id`. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"The thread does not exist, your policy does not admit reading it, or your membership is not in its list: `resource_missing`. This door puts nobody in a list (`POST /threads` first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"429":{"description":"About a minute after your last mint, or past your daily number or the hostname's: `rate_limit`, `Retry-After` in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"502":{"description":"The AI Gateway refused the mint or its model list: `bad_gateway`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"503":{"description":"This hostname states no `CLIENT_SECRETS_PER_DAY` or no `CLIENT_SECRETS_PER_HOSTNAME_PER_DAY`: `service_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/messages/{id}":{"get":{"tags":["conversation.messages"],"summary":"Retrieve one message.","description":"The row as stored.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/conversation.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Message"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"patch":{"tags":["conversation.messages"],"summary":"Replace a message's parts.","description":"The writer's own message alone, the one its `metadata[\"schema.org:sender\"]` names. `parts` replaces the whole list; every metadata key is computed, so nothing else is accepted, but `metadata[\"ai-sdk.dev:outcome\"]: \"aborted\"`, the Stop of the reader the model's answer streamed to, sent with the parts the page drew: only your own turn's answer, in a thread you read, with no outcome yet, within 10 minutes of its `id`'s time; any other is 404 `resource_missing`. A Stop stands only as the start of what the model said: once the whole answer is in, any other text, or a part that is no text, is written over by it and the key dropped. A body naming neither key is refused and writes nothing.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parts":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":200000}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","const":"file"},"url":{"type":"string","minLength":1,"maxLength":2000000,"pattern":"^(?:\\/conversation\\/v1\\/attachments\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|data:(?:text\\/vtt|application\\/json);base64,[A-Za-z0-9+/]*={0,2}$)"}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","const":"data-schema.org:Action"},"data":{"type":"object","properties":{"@type":{"type":"string","enum":["ConfirmAction","CancelAction"]},"name":{"type":"string","minLength":1,"maxLength":80},"actionStatus":{"type":"string","enum":["PotentialActionStatus","CompletedActionStatus","FailedActionStatus"]},"object":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":["@type","name","actionStatus"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"}},"metadata":{"type":"object","properties":{"ai-sdk.dev:outcome":{"type":"string","const":"aborted","externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}}},"required":["ai-sdk.dev:outcome"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"The message as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Message"}}}},"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. `metadata` on a message whose role is not `assistant` is refused on `metadata.ai-sdk.dev:outcome`. A message holding `metadata[\"jedger.com:client_reported\"]` holds text parts with words alone, so any other `parts` are refused on `parts`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"A body past 3145728 bytes, this door's own ceiling: `payload_too_large`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"delete":{"tags":["conversation.messages"],"summary":"Delete a message with its attachments.","description":"The writer's own message, or a Stop that drew nothing: your own turn's answer, holding no parts and no outcome yet, within 10 minutes of its `id`'s time. Each row deleted writes its `.deleted` event; the objects stay in the bucket.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"responses":{"200":{"description":"The message as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Message"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/attachments":{"get":{"tags":["conversation.attachments"],"summary":"List one page of attachments, newest first, by message, thread, organization or id.","description":"`message_id`, repeated for several messages, at most 100, `thread_id`, `organization_id` or `id`. One page, newest first: `limit` 1 to 100, 100 when absent, paged with `starting_after` or `ending_before`. With `thread_id` and `message_id` both, the page is the thread's, then narrowed to those messages, so it may hold fewer than `limit` with more to come.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"message_id","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":false},{"in":"query","name":"thread_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false}],"responses":{"200":{"description":"A bare array of attachments.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/conversation.AttachmentAnswer"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"post":{"tags":["conversation.attachments"],"summary":"Write a file's row on a message.","description":"Send an `id` only to make the write idempotent: a resend of an id the message already holds writes nothing and answers 200 with the row as it stands, opening no upload. A message holds at most 5 files, and a file at most 268435456 bytes, checked here when `size` is told and again when a multipart upload completes. With `multipart: true` an R2 multipart upload opens under the row's id and the answer carries its `upload_id`; a multipart file's `size` is written when the upload completes. A file joins only a message one of your own memberships spoke.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"message_id":{"$ref":"#/components/schemas/conversation.Uuid"},"filename":{"anyOf":[{"type":"string","maxLength":998},{"type":"null"}]},"media_type":{"$ref":"#/components/schemas/conversation.MediaType"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"multipart":{"type":"boolean"}},"required":["message_id","filename","media_type"],"additionalProperties":false}}}},"responses":{"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. A message already holding 5 files: `attachments_too_many`, `param` `message_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your memberships do not allow this row to be created: `forbidden`, with no `param`; nothing is written. No message has this `message_id`, one another membership spoke, or you may not write on it: the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"A file whose told `size` passes 268435456 bytes: `attachment_too_large`, `param` `size`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"429":{"description":"You are a guest of the organization and, since UTC midnight on this hostname, you have written `MESSAGES_PER_DAY` messages, or this write's files would pass `ATTACHMENTS_PER_DAY`: `rate_limit`, `Retry-After` in seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"503":{"description":"This hostname states no `MESSAGES_PER_DAY` or no `ATTACHMENTS_PER_DAY` a counted write needs: `service_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"2XX":{"description":"201, the row written, with `upload_id` for a multipart file; 200, a resend, the row as it stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.AttachmentCreated"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/attachments/{id}":{"get":{"tags":["conversation.attachments"],"summary":"Stream a file's bytes.","description":"The object with the row's `media_type`, `Range` honoured with 206 and `Content-Range`, shown `inline` unless `?download=1` asks for `attachment` or the file is a PDF, which is always `attachment` (RFC 6266). A `Range` of one of the forms `bytes=<first>-`, `bytes=<first>-<last>` and `bytes=-<suffix>` is honoured; several ranges, another form, or a first byte past the file's end is ignored and the whole file answered 200, as RFC 9110 section 14.2 lets a server do (https://www.rfc-editor.org/rfc/rfc9110#section-14.2). An object keyed by an id is never rewritten, so the answer is cached privately for a year.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/conversation.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false},{"in":"query","name":"download","schema":{"description":"`1` answers `Content-Disposition: attachment`; any other value, or none, `inline`.","type":"string"},"description":"`1` answers `Content-Disposition: attachment`; any other value, or none, `inline`.","required":false},{"name":"Range","in":"header","required":false,"description":"One byte range (RFC 9110 section 14.2), answered 206 with `Content-Range`.","schema":{"type":"string"}}],"responses":{"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`. A row whose upload never completed has no bytes in the bucket and answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"2XX":{"description":"The bytes, 200, or 206 for a `Range`.","headers":{"Content-Type":{"description":"The row's `media_type`.","schema":{"type":"string"}},"Content-Length":{"description":"The bytes answered: the file's, or the range's on a 206.","schema":{"type":"string"}},"Content-Security-Policy":{"description":"`sandbox` on every answer: a file opened in place runs no script and has no origin (https://www.w3.org/TR/CSP3/#directive-sandbox).","schema":{"type":"string"}},"X-Content-Type-Options":{"description":"`nosniff` on every answer: the browser takes `Content-Type` as declared and never sniffs another (https://fetch.spec.whatwg.org/#x-content-type-options-header).","schema":{"type":"string"}},"Accept-Ranges":{"description":"`bytes`.","schema":{"type":"string"}},"ETag":{"description":"The object's ETag in the bucket.","schema":{"type":"string"}},"Cache-Control":{"description":"`private, max-age=31536000, immutable`.","schema":{"type":"string"}},"Content-Disposition":{"description":"`inline`, or `attachment` with `?download=1` and always for `application/pdf` (no PDF viewer opens under the sandbox), with `filename` and, for a name outside ASCII, `filename*` (RFC 6266 section 4.3, RFC 8187).","schema":{"type":"string"}},"Content-Range":{"description":"On a 206 alone: `bytes <first>-<last>/<size>`.","schema":{"type":"string"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"patch":{"tags":["conversation.attachments"],"summary":"Upload one part of a file, complete its upload, or write its length.","description":"A file of the writer's own message alone. With `?part=<n>&upload_id=<id>` the body is the part's raw bytes, at most 10485760 bytes, not the JSON body below; it uploads part n (1 to 10000) and answers `{ partNumber, etag }`.\n\nWithout `part`, the JSON body `{ upload_id, parts }` completes the upload, writes `size` and answers the row; an audio file then starts its Workflow, a transcript appended to the message, and an image file its reading, when the card of the thread's back office names `jedger.com:reading`. The row is pushed to the thread's devices, and the message is mailed when this was its last file (`POST /messages`). A completed file past 268435456 bytes is refused 413 and its row and object are deleted, the row with its `.deleted` event.\n\nOr the JSON body `{ \"schema.org:duration\": \"PT1M35S\" }` alone writes the file's length into its `metadata`, an ISO 8601 duration in whole seconds (https://schema.org/duration), with its `.updated` event, and answers the row; no bytes move and no Workflow starts.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true},{"in":"query","name":"part","schema":{"description":"The part's number, 1 to 10000; with it the body is the part's raw bytes.","type":"integer","minimum":1,"maximum":10000},"description":"The part's number, 1 to 10000; with it the body is the part's raw bytes.","required":false},{"in":"query","name":"upload_id","schema":{"description":"The R2 upload id the create answered; required with `part`.","type":"string","minLength":1},"description":"The R2 upload id the create answered; required with `part`.","required":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"upload_id":{"type":"string","minLength":1,"maxLength":998},"parts":{"minItems":1,"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":1,"maximum":10000},"etag":{"type":"string","minLength":1}},"required":["partNumber","etag"]}}},"required":["upload_id","parts"],"additionalProperties":false},{"type":"object","properties":{"schema.org:duration":{"type":"string","pattern":"^P(?:(?:\\d+D|\\d+M(?:\\d+D)?|\\d+Y(?:\\d+M(?:\\d+D)?)?)(?:T(?:\\d+H(?:\\d+M(?:\\d+S)?)?|\\d+M(?:\\d+S)?|\\d+S))?|T(?:\\d+H(?:\\d+M(?:\\d+S)?)?|\\d+M(?:\\d+S)?|\\d+S)|\\d+W)$","externalDocs":{"url":"https://schema.org/duration"}}},"required":["schema.org:duration"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"The part's `{ partNumber, etag }`, or the completed row.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/conversation.UploadedPart"},{"$ref":"#/components/schemas/conversation.AttachmentAnswer"}]}}}},"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. A `part` that is no whole number from 1 to 10000, refused on `part`; `part` with no `upload_id`, or an upload id R2 refuses for the part or the completion, refused on `upload_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"A part past 10485760 bytes, refused as its bytes arrive: `part_too_large`. A completed file past 268435456 bytes: `attachment_too_large`, its row and object deleted; when your policy refuses that delete, 404 `resource_missing` and both stay. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"delete":{"tags":["conversation.attachments"],"summary":"Delete a file's row.","description":"A file of the writer's own message alone. The object stays in the bucket, so its `.deleted` event can restore it.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"responses":{"200":{"description":"The row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.AttachmentAnswer"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/actions":{"get":{"tags":["conversation.actions"],"summary":"List the actions your memberships reach, newest first.","description":"Before ordering, list the thread's (`thread_id`) and never order the same action twice. `metadata[schema.org:agent]=` keeps one taker's, `metadata[<tag>]=true` one tag's, e.g. `metadata[jedger.com:support]=true`. The next calls: `metadata[schema.org:CommunicateAction]=true`, with `metadata[schema.org:actionStatus]=PotentialActionStatus` for those still to make and `metadata[schema.org:recipient]=<membership id>` for one membership's; before scheduling, read that membership's and never schedule the same call twice. The door answers newest id first, never by `scheduledTime`, so sort the page by `data.scheduledTime` yourself. `metadata[schema.org:recipient]=<membership id>` alone answers that membership's calls and the contacts recorded with it, newest first, a record's time its `data.endTime`. `scheduledTime[gte]` (inclusive) and `scheduledTime[lt]` (exclusive) narrow to a range of `data.scheduledTime`, `endTime[gte]` and `endTime[lt]` to a range of `data.endTime`, each an ISO 8601 date-time with its offset, compared as instants: the calls made this week are `metadata[schema.org:CommunicateAction]=true&endTime[gte]=2026-11-09T00:00:00+09:00&endTime[lt]=2026-11-16T00:00:00+09:00`, an `InviteAction` among them a meeting booked; `metadata[schema.org:InviteAction]=true` answers the meetings booked alone.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"thread_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"metadata","schema":{"description":"Stripe's metadata form, one parameter per key: `metadata[schema.org:agent]=<membership id>`, the taker; `metadata[schema.org:recipient]=<membership id>`, who a next call reaches; `metadata[schema.org:actionStatus]=ActiveActionStatus`, the action's status, the one the claim lock trusts; or `metadata[<tag>]=true|false`, a tag under its owner's prefix, `metadata[schema.org:CommunicateAction]=true` for the next calls, `metadata[schema.org:InviteAction]=true` for the meetings booked. Every key is one `@>` on the GIN index.","type":"object","propertyNames":{"anyOf":[{"type":"string","const":"schema.org:agent"},{"type":"string","const":"schema.org:recipient"},{"type":"string","const":"schema.org:actionStatus"},{"type":"string","pattern":"^(?:jedger\\.com:[a-z][a-z0-9_]*|schema\\.org:[A-Z][A-Za-z]*)$"}]},"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"string","enum":["true","false"]},{"type":"string","enum":["PotentialActionStatus","ActiveActionStatus","CompletedActionStatus","FailedActionStatus"]}]}},"description":"Stripe's metadata form, one parameter per key: `metadata[schema.org:agent]=<membership id>`, the taker; `metadata[schema.org:recipient]=<membership id>`, who a next call reaches; `metadata[schema.org:actionStatus]=ActiveActionStatus`, the action's status, the one the claim lock trusts; or `metadata[<tag>]=true|false`, a tag under its owner's prefix, `metadata[schema.org:CommunicateAction]=true` for the next calls, `metadata[schema.org:InviteAction]=true` for the meetings booked. Every key is one `@>` on the GIN index.","required":false,"style":"deepObject","explode":true},{"in":"query","name":"scheduledTime[gte]","schema":{"$ref":"#/components/schemas/conversation.DateTime"},"required":false},{"in":"query","name":"scheduledTime[lt]","schema":{"$ref":"#/components/schemas/conversation.DateTime"},"required":false},{"in":"query","name":"endTime[gte]","schema":{"$ref":"#/components/schemas/conversation.DateTime"},"required":false},{"in":"query","name":"endTime[lt]","schema":{"$ref":"#/components/schemas/conversation.DateTime"},"required":false}],"responses":{"200":{"description":"A bare array of actions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/conversation.Action"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"post":{"tags":["conversation.actions"],"summary":"Order an action from a thread for the organization's staff, schedule a next call, or record a contact made.","description":"`data` is the schema.org Action, JSON-LD with bare keys, and holds Action's properties (https://schema.org/Action) and `scheduledTime` (https://schema.org/PlanAction), and beside them any key of your own under its owner's prefix, `example.com:note`, any JSON value, which no statement reads; any other key is refused, naming it. `object` is a Thing with its `@type`, e.g. a `FoodEstablishmentReservation` or a `TaxiReservation`, never bare text. Write `scheduledTime`, with the organization's offset, only when the guest named a time; never invent one. The top-level booleans beside `data` are its tags, each under its owner's prefix: `jedger.com:support`, jedger's, and the kind, a schema.org Reservation type such as `schema.org:FoodEstablishmentReservation`; a tag inside `data`, or one without its prefix, is refused. Then tell the takers in the guest's thread (the document's description, \"When an agent acts\"). `thread_id`, when named, is a thread you may read in `organization_id`. `actionStatus` `ActiveActionStatus` creates it claimed, your membership in the organization its agent and `startTime` now, as a back office's run, a ReplyAction, is created by its device at the run's start; a run is pushed to the thread's devices, an order never. An action with a thread written fires the `action.created` notifications. Send an `id` only to make the write idempotent: a resend of one already written answers 200 with the action as it stands.\n\nA next call, \"call this factory on 11-12\", is one row on the organization's call list: `data` holds exactly `@context`, `@type` `CommunicateAction` (https://schema.org/CommunicateAction), `scheduledTime` (ISO 8601 with the organization's offset) and `recipient` (https://schema.org/recipient), whose `@type` is `Person` or `Organization`, `identifier` the `iam.memberships` id and `name` the name on the card about it, `data.name.full` of `GET /iam/v1/cards?membership_id=`. It names no `thread_id` and sends no tag; any other key but one of your own under its owner's prefix is refused, since what was said is written when it is finished, and what the organization remembers about the membership on its memory page (`/design/v1/pages`, `schema.org:about`). The statement writes it `PotentialActionStatus` with the tag `schema.org:CommunicateAction` and the copies `schema.org:recipient` and `schema.org:actionStatus` in `metadata`. It has no thread, so no customer reads it, no device is pushed to and nobody is notified. Its readers and writers are the owner and the posts granted on that tag; a caller without the grant is 403 `forbidden`. A person presses it done: `PATCH` with `CompletedActionStatus` or `FailedActionStatus`, no claim, with what was said. To move the time, `PATCH` a new `scheduledTime`. A later call is one more row; a call dropped is deleted, its `.deleted` event keeping it. `InviteAction` (https://schema.org/InviteAction), a CommunicateAction asking them to attend, is a call the same way, with the same tag and its own, `schema.org:InviteAction`, and may name `event`, a `conversation.calendar_events` id of the same organization; a calendar event created with participants writes one for each of them itself (`POST /conversation/v1/calendar_events`).\n\nA contact made by a pipe jedger cannot send, a text or a KakaoTalk message sent from your phone, a phone call, a meeting in person, is recorded with no plan: `@type` `CommunicateAction` or `InviteAction` and `actionStatus` `CompletedActionStatus`. `data` holds `@context`, `@type`, `actionStatus`, `recipient` (required, as on a call), and may hold `instrument`, the card's channel it went by, one JSContact object with its `@type` copied from the card: `Phone` with `number` and `features` such as `{\"text\": true}` or `{\"voice\": true}` (RFC 9553 section 2.3.3, https://www.rfc-editor.org/rfc/rfc9553#section-2.3.3), `EmailAddress` with `address` (section 2.3.1), `OnlineService` with `service` and `uri` or `user` (section 2.3.2), or `Address` (section 2.5.1.1), each with only its section's properties; `description`, what was said; `location`, where, a meeting in person having no `instrument`; and, on an `InviteAction`, `event`. No `scheduledTime` and no `thread_id`. The statement writes your membership in the organization as its agent and `endTime` now, with the same tag and copies a call gets, so it stands on the call list's filters; a caller with no membership there is 403.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"thread_id":{"$ref":"#/components/schemas/conversation.Uuid"},"data":{"type":"object","properties":{"@context":{"type":"string"},"@type":{"type":"string","pattern":"^(?:[A-Z][A-Za-z]*)?Action$"},"actionStatus":{"type":"string","enum":["PotentialActionStatus","ActiveActionStatus","CompletedActionStatus","FailedActionStatus"]},"object":{"type":"object","properties":{"@type":{"type":"string","pattern":"^[A-Z][A-Za-z]*$"}},"required":["@type"],"additionalProperties":{}},"scheduledTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"recipient":{"type":"object","properties":{"@type":{"type":"string","enum":["Person","Organization"]},"identifier":{"$ref":"#/components/schemas/conversation.Uuid"},"name":{"type":"string","minLength":1}},"required":["@type","identifier","name"],"additionalProperties":false},"instrument":{"oneOf":[{"type":"object","properties":{"@type":{"type":"string","const":"Phone"},"number":{"type":"string","minLength":1},"features":{"type":"object","propertyNames":{"type":"string","enum":["mobile","voice","text","video","main-number","textphone","fax","pager"]},"additionalProperties":{"type":"boolean","const":true}},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["@type","number"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"EmailAddress"},"address":{"type":"string","minLength":1},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["@type","address"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"OnlineService"},"service":{"type":"string","minLength":1},"uri":{"type":"string","minLength":1},"user":{"type":"string","minLength":1},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["@type"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string"},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"phoneticScript":{"type":"string"},"phoneticSystem":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["@type"],"additionalProperties":false}],"type":"object"},"description":{"type":"string","minLength":1},"location":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"@type":{"type":"string","pattern":"^[A-Z][A-Za-z]*$"}},"required":["@type"],"additionalProperties":{}}]},"event":{"$ref":"#/components/schemas/conversation.Uuid"},"agent":{"type":"object","properties":{"identifier":{"$ref":"#/components/schemas/conversation.Uuid"}},"additionalProperties":{}},"startTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"result":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"resultComment":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"error":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["@type"],"additionalProperties":false,"patternProperties":{"^@":{"description":"A JSON-LD keyword, `@id` beside `@context` and `@type` (https://www.w3.org/TR/json-ld11/#keywords)."},"^(?:actionProcess|participant|provider|target|additionalType|alternateName|disambiguatingDescription|identifier|image|mainEntityOfPage|name|potentialAction|sameAs|subjectOf|url)$":{"description":"A schema.org Action property this body does not type, any JSON (https://schema.org/Action)."},"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$":{"description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused. A boolean under a tag's form, \"jedger.com:support\": true or \"schema.org:FoodEstablishmentReservation\": true, is a tag sent one level too deep and is refused."}}}},"required":["organization_id","data"],"additionalProperties":{"type":"boolean"},"examples":[{"organization_id":"00000000-0000-7000-8000-000000000001","data":{"@context":"https://schema.org","@type":"CommunicateAction","actionStatus":"PotentialActionStatus","scheduledTime":"2026-11-12T10:00:00+09:00","recipient":{"@type":"Organization","identifier":"00000000-0000-7000-8000-000000000002","name":"예시 공장"}}},{"organization_id":"00000000-0000-7000-8000-000000000001","data":{"@context":"https://schema.org","@type":"CommunicateAction","actionStatus":"CompletedActionStatus","recipient":{"@type":"Person","identifier":"00000000-0000-7000-8000-000000000003","name":"홍길동"},"instrument":{"@type":"Phone","number":"tel:+12025550178","features":{"mobile":true,"text":true}},"description":"Sent the quote for 200 boxes; asked for an answer by Friday."}},{"organization_id":"00000000-0000-7000-8000-000000000001","thread_id":"00000000-0000-7000-8000-000000000004","jedger.com:support":true,"schema.org:FoodEstablishmentReservation":true,"data":{"@context":"https://schema.org","@type":"ReserveAction","scheduledTime":"2026-11-12T19:00:00+09:00","object":{"@type":"FoodEstablishmentReservation","partySize":2,"reservationFor":{"@type":"FoodEstablishment","name":"예시 식당"},"underName":{"@type":"Person","name":"홍길동"}},"description":"Dinner for two at 19:00; a window table if possible."}},{"organization_id":"00000000-0000-7000-8000-000000000001","thread_id":"00000000-0000-7000-8000-000000000004","jedger.com:support":true,"data":{"@context":"https://schema.org","@type":"Action","description":"The guest asks whether a late checkout at 14:00 is possible."}}]}}}},"responses":{"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. A key of `data` that is neither Action's nor under its owner's prefix, a tag inside `data`, or a tag without its prefix, is refused naming it; so is, on a next call, a `thread_id`, a tag, a missing `recipient` or `scheduledTime`, or any other key of `data` but one under its owner's prefix; on a record, a `thread_id`, a tag, a missing `recipient`, a `scheduledTime`, an `instrument` that is no JSContact Phone, EmailAddress, OnlineService or Address, or a blank `description`; and `event` on anything but an `InviteAction`. An `event` naming no calendar event of the organization is 400 `invalid_request`, `param` `data.event`, its message also naming a policy that refuses the row, since the one INSERT judges both.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your memberships do not allow this row to be created: `forbidden`, with no `param`; nothing is written. A `thread_id` you may not read or of another organization, or, created claimed, no membership in the organization: the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"2XX":{"description":"201, the action written; 200, a resend, the action as it stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Action"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/actions/{id}":{"get":{"tags":["conversation.actions"],"summary":"Retrieve one action.","description":"The row as the table holds it.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/conversation.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Action"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"patch":{"tags":["conversation.actions"],"summary":"Claim, finish or amend an action.","description":"`{\"data\": {\"actionStatus\": \"ActiveActionStatus\"}}` claims it, writing your membership as `metadata[\"schema.org:agent\"]`, `ActiveActionStatus` as `metadata[\"schema.org:actionStatus\"]` and now as `metadata[\"schema.org:startTime\"]`, the claim lock, which reads `metadata` alone, `data` holding their copies and `agent` as `{\"identifier\": <your membership>}`; the first wins, the rest 409. `CompletedActionStatus` or `FailedActionStatus` with `result` or `error` finishes it, by its agent alone within PT10M of `metadata[\"schema.org:startTime\"]`, writing `metadata[\"schema.org:endTime\"]` and `data.endTime` now; after that the agent has lost it, its finish is 409, and anyone, the agent included, may claim it again. A run's `result`, the messages it wrote, is written as `resultComment` on a ReplyAction (https://schema.org/resultComment); a run that read the thread and chose to post nothing ends CompletedActionStatus with none, which the thread draws as a quiet line, never a message. A claim or a finish of a run is pushed to the thread's devices with `metadata[\"xmpp.org:chatstate\"]` (https://xmpp.org/extensions/xep-0085.html#definitions), `composing` while it runs, `paused` past PT10M, `active` once it ends. A next call, a `CommunicateAction` still `PotentialActionStatus`, needs no claim: `{\"data\": {\"actionStatus\": \"CompletedActionStatus\"}}` or `FailedActionStatus` from anyone your policy lets update it finishes it at once, writing your membership as its agent, once; a second press is 409. Beside the outcome a call's finish takes the record of the contact, `instrument`, `description` and `location`, as a record's `POST` does, `{\"data\": {\"actionStatus\": \"CompletedActionStatus\", \"instrument\": {\"@type\": \"Phone\", \"number\": \"tel:+82-10-1234-5678\", \"features\": {\"text\": true}}, \"description\": \"Sent the quote.\"}}`; on a row that is no CommunicateAction or InviteAction they are 400 naming the key, and on a call already finished 409. The same press plans the next call when the finish's `result` is one, `{\"@type\": \"CommunicateAction\", \"identifier\": \"<a uuidv7 you mint>\", \"scheduledTime\": \"2026-11-19T10:00:00+09:00\"}` (https://schema.org/result): the one statement writes that call for the same `recipient`, `PotentialActionStatus` under the id you minted, with its own `action.created` event, and keeps `result` on the finished row as its `@type` and `identifier` alone; a policy that may not update the call or create the new one refuses both, 403, and an `identifier` an action already holds refuses both, 409; neither row is ever written alone. An `InviteAction` is a call the same way. Any other `data` merges, a null removing a key, `{\"data\": {\"scheduledTime\": \"2026-11-19T10:00:00+09:00\"}}` moving a call; `actionStatus`, `agent`, `startTime`, `endTime` and `resultComment` move only by a claim or a finish, and `recipient` is fixed when a call is created, 400 naming them otherwise.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"actionStatus":{"type":"string","const":"ActiveActionStatus"}},"required":["actionStatus"],"additionalProperties":false},{"type":"object","properties":{"actionStatus":{"type":"string","enum":["CompletedActionStatus","FailedActionStatus"]},"result":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"error":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"instrument":{"oneOf":[{"type":"object","properties":{"@type":{"type":"string","const":"Phone"},"number":{"type":"string","minLength":1},"features":{"type":"object","propertyNames":{"type":"string","enum":["mobile","voice","text","video","main-number","textphone","fax","pager"]},"additionalProperties":{"type":"boolean","const":true}},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["@type","number"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"EmailAddress"},"address":{"type":"string","minLength":1},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["@type","address"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"OnlineService"},"service":{"type":"string","minLength":1},"uri":{"type":"string","minLength":1},"user":{"type":"string","minLength":1},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["@type"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string"},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"phoneticScript":{"type":"string"},"phoneticSystem":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["@type"],"additionalProperties":false}],"type":"object"},"description":{"type":"string","minLength":1},"location":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"@type":{"type":"string","pattern":"^[A-Z][A-Za-z]*$"}},"required":["@type"],"additionalProperties":{}}]}},"required":["actionStatus"],"additionalProperties":false},{"type":"object","propertyNames":{"anyOf":[{"enum":["actionProcess","error","instrument","location","object","participant","provider","result","target","additionalType","alternateName","description","disambiguatingDescription","identifier","image","mainEntityOfPage","name","potentialAction","sameAs","subjectOf","url","scheduledTime"]},{"pattern":"^@","description":"A JSON-LD keyword, `@id` beside `@context` and `@type` (https://www.w3.org/TR/json-ld11/#keywords)."},{"pattern":"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$","description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused."}]},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]}}]}},"required":["data"],"additionalProperties":false,"examples":[{"data":{"actionStatus":"ActiveActionStatus"}},{"data":{"actionStatus":"CompletedActionStatus","instrument":{"@type":"Phone","number":"tel:+12025550142","features":{"voice":true}},"description":"Walked through the quote; they answer by Friday."}},{"data":{"actionStatus":"CompletedActionStatus","description":"No answer yet; call again next week.","result":{"@type":"CommunicateAction","identifier":"00000000-0000-7000-8000-000000000006","scheduledTime":"2026-11-19T10:00:00+09:00"}}}]}}}},"responses":{"200":{"description":"The action as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Action"}}}},"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. A merge of a next call, a `CommunicateAction` or `InviteAction`, moves its `scheduledTime` and keys under their owner's prefix alone: any other key is refused naming it, and `@type` `CommunicateAction` or `InviteAction` on any row, and `event` on any row. A finish carrying `instrument`, `description` or `location` on a row that is neither, naming the key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. A finish of a next call your memberships may not update, or whose planned call they may not create: `forbidden`, with no `param`; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`. A merge your policy refuses answers the same, the row being retrieved under `conversation:UPDATE`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A claim of an action another membership holds or your memberships may not take, a finish by a membership that is not its agent or past PT10M of its claim, a finish of a next call already finished, or one whose planned call's `identifier` an action already holds, `param` `data.result.identifier`: `conflict`, nothing written. A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"delete":{"tags":["conversation.actions"],"summary":"Delete an action.","description":"Writes its `.deleted` event, which keeps the row whole: a dropped plan, a next call no longer meant, is deleted, never finished.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"responses":{"200":{"description":"The action as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Action"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/calendars":{"get":{"tags":["conversation.calendars"],"summary":"List the calendars your memberships reach, newest first.","description":"A calendar is JMAP Calendars' Calendar (https://datatracker.ietf.org/doc/html/draft-ietf-jmap-calendars#section-4), what an organization's calendar events are on, one for everyone or one per person. `organization_id` narrows to one organization. Your own color and whether a calendar is shown are not here: they are your `users.data.conversation`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false}],"responses":{"200":{"description":"A bare array of calendars.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/conversation.Calendar"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"post":{"tags":["conversation.calendars"],"summary":"Add a calendar to an organization.","description":"`data` holds JMAP's Calendar keys bare, the three jedger writes: `name`, 1 to 255 octets, mandatory; `timeZone`, an IANA name, the zone of an event that names none; `description`. A key of your own under its owner's prefix, `example.com:note`, rides beside them, any JSON value, read by no statement; any other key is refused, naming it. Send an `id` only to make the write idempotent: a resend of one already written answers 200 with the calendar as it stands. Each write writes `calendar.created`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"data":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"timeZone":{"type":["string","null"]}},"required":["name"],"additionalProperties":false,"patternProperties":{"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$":{"description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused."}}}},"required":["organization_id","data"],"additionalProperties":false,"examples":[{"organization_id":"00000000-0000-7000-8000-000000000001","data":{"name":"Field visits","description":"Visits to customers' plants.","timeZone":"Asia/Seoul"}}]}}}},"responses":{"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. A key of `data` that is no Calendar property jedger writes is refused naming it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your memberships do not allow this row to be created: `forbidden`, with no `param`; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"2XX":{"description":"201, the calendar written; 200, a resend, the calendar as it stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Calendar"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/calendars/{id}":{"get":{"tags":["conversation.calendars"],"summary":"Retrieve one calendar.","description":"The row as the table holds it.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/conversation.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The calendar.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Calendar"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"patch":{"tags":["conversation.calendars"],"summary":"Rename a calendar or change its zone.","description":"`data` merges shallowly, a null removing a key: `{\"data\": {\"name\": \"Visits\"}}` renames it. Each key is judged as the create judges it; `name` cannot be removed. Writes `calendar.updated`.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","propertyNames":{"anyOf":[{"enum":["name","description","timeZone"]},{"pattern":"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$","description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused."}]},"additionalProperties":{}}},"required":["data"],"additionalProperties":false}}}},"responses":{"200":{"description":"The calendar as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Calendar"}}}},"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`. A merge your policy refuses answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"delete":{"tags":["conversation.calendars"],"summary":"Delete a calendar.","description":"A calendar an event is still on is refused, 409 `restrict_violation`: delete or keep its events first. Writes its `.deleted` event, which keeps the row.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"responses":{"200":{"description":"The calendar as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Calendar"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/calendar_events":{"get":{"tags":["conversation.calendar_events"],"summary":"List the calendar events your memberships reach, newest first.","description":"A calendar event is a JSCalendar Event (RFC 8984 section 2.1, https://www.rfc-editor.org/rfc/rfc8984#section-2.1), time people share on a calendar, a meeting or a call at a moment, never a to-do: the work around it is an action. `organization_id` narrows to one organization, `calendar_id` to one calendar; `metadata[membership_id]=<membership id>` to the events whose `participants` name that membership. `after` and `before` are JMAP's CalendarEvent/query range (https://datatracker.ietf.org/doc/html/draft-ietf-jmap-calendars#section-5.11.1), LocalDateTimes read in `timeZone`, `Etc/UTC` when absent: an event matches when its `utc_end`, the end of its last occurrence or `infinity`, is after `after` and its `utc_start`, its first occurrence's start, is before `before`; a recurring match comes back once, its rule whole, and you expand its occurrences yourself. The door answers newest id first, never by `start`, so sort the page by `utc_start` yourself.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"calendar_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"after","schema":{"description":"JMAP's `after`: the end of the event, or of any recurrence of it, in `timeZone`, must be after this LocalDateTime, `2026-11-01T00:00:00`. Tested against the column `utc_end`, the end of the last occurrence.","type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d:([0-5]\\d|60)(\\.\\d*[1-9])?$"},"description":"JMAP's `after`: the end of the event, or of any recurrence of it, in `timeZone`, must be after this LocalDateTime, `2026-11-01T00:00:00`. Tested against the column `utc_end`, the end of the last occurrence.","required":false},{"in":"query","name":"before","schema":{"description":"JMAP's `before`: the start of the event, or of any recurrence of it, in `timeZone`, must be before this LocalDateTime. Tested against the column `utc_start`, the first occurrence's start.","type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d:([0-5]\\d|60)(\\.\\d*[1-9])?$"},"description":"JMAP's `before`: the start of the event, or of any recurrence of it, in `timeZone`, must be before this LocalDateTime. Tested against the column `utc_start`, the first occurrence's start.","required":false},{"in":"query","name":"timeZone","schema":{"description":"JMAP's `timeZone` argument, the IANA zone `after` and `before` are read in; absent, `Etc/UTC`.","type":"string"},"description":"JMAP's `timeZone` argument, the IANA zone `after` and `before` are read in; absent, `Etc/UTC`.","required":false},{"in":"query","name":"metadata","schema":{"description":"Stripe's metadata form: `metadata[membership_id]=<membership id>`, the events whose participants name that membership. One `@>` on the GIN index.","type":"object","properties":{"membership_id":{"$ref":"#/components/schemas/conversation.Uuid"}},"additionalProperties":false},"description":"Stripe's metadata form: `metadata[membership_id]=<membership id>`, the events whose participants name that membership. One `@>` on the GIN index.","required":false,"style":"deepObject","explode":true}],"responses":{"200":{"description":"A bare array of calendar events.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/conversation.CalendarEventAnswer"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"post":{"tags":["conversation.calendar_events"],"summary":"Put an event on the organization's calendar.","description":"`calendar_id` names the calendar it goes on, one of `organization_id`'s (`GET /calendars?organization_id=`), and stays as written; another organization's, or one that does not exist, is 409 `foreign_key_violation`. `utc_start` and `utc_end` are written by the statement from `data`. `data` is the JSCalendar Event with bare keys and holds RFC 8984's Event properties (sections 4 and 5.1) and, beside them, vendor-specific ones, a key under its owner's prefix, `example.com:customprop` (section 3.3), any JSON value, read by no statement; any other key is refused, naming it. `@type` is `Event` and `start` a LocalDateTime with no offset, `2026-11-12T10:00:00` (section 1.4.5), both mandatory; `timeZone` an IANA name, `Asia/Seoul` (section 4.7.1), absent a floating time; `duration` an ISO 8601 duration, `PT1H` (section 1.4.6); `status` `confirmed`, `cancelled` or `tentative` (section 5.1.3). `participants` is keyed by `iam.memberships` id, each a Participant with `@type` `Participant` and `roles`, a set of `owner`, `attendee`, `optional`, `informational`, `chair` or `contact`, at least one, and an optional `name` and `participationStatus`, `needs-action`, `accepted`, `declined`, `tentative` or `delegated` (section 4.4.6); the participants' keys become `metadata.membership_id`, the event's readers. `uid` is written by the statement, `urn:uuid:` and the row id; sending it is refused. Send an `id` only to make the write idempotent: a resend of one already written answers 200 with the event as it stands. Each write writes `calendar_event.created`.\n\nEach participant who is not its `owner` is asked to it: the same statement writes one action per such participant, an `InviteAction` (https://schema.org/InviteAction) `PotentialActionStatus` with its `action.created` event, `event` the new row's id, `recipient` the participant (`identifier` its membership, `name` its `name`, `@type` `Organization` when its `kind` is `group`, else `Person`), `scheduledTime` the event's first start with its zone's offset, your membership in the organization its agent, and the tags `schema.org:CommunicateAction` and `schema.org:InviteAction`, so it stands on the call list until you finish it with what was said. The event is written only when your policy may create each of those actions too and you hold a membership in the organization; otherwise 403 and nothing is written.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"calendar_id":{"$ref":"#/components/schemas/conversation.Uuid"},"data":{"type":"object","properties":{"@type":{"type":"string","const":"Event"},"title":{"type":"string"},"description":{"type":"string"},"locations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Location"},"name":{"type":"string"},"description":{"type":"string"}},"required":["@type"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}},"recurrenceRules":{"type":"array","items":{"type":"object","properties":{"interval":{"type":"integer","minimum":1,"maximum":9007199254740991},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}},"participants":{"type":"object","propertyNames":{"$ref":"#/components/schemas/conversation.Uuid"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Participant"},"name":{"type":"string"},"email":{"type":"string"},"description":{"type":"string"},"roles":{"type":"object","propertyNames":{"type":"string","enum":["owner","attendee","optional","informational","chair","contact"]},"additionalProperties":{"type":"boolean","const":true}},"participationStatus":{"type":"string","enum":["needs-action","accepted","declined","tentative","delegated"]}},"required":["@type","roles"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}},"alerts":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Alert"},"trigger":{"anyOf":[{"type":"object","properties":{"@type":{"type":"string","const":"OffsetTrigger"},"offset":{"type":"string","pattern":"^[+-]?P(?:(?:\\d+W(?:\\d+D)?|\\d+D)(?:T(?:\\d+H(?:\\d+M(?:\\d+(?:\\.\\d*[1-9])?S)?)?|\\d+M(?:\\d+(?:\\.\\d*[1-9])?S)?|\\d+(?:\\.\\d*[1-9])?S))?|T(?:\\d+H(?:\\d+M(?:\\d+(?:\\.\\d*[1-9])?S)?)?|\\d+M(?:\\d+(?:\\.\\d*[1-9])?S)?|\\d+(?:\\.\\d*[1-9])?S))$"},"relativeTo":{"type":"string","enum":["start","end"]}},"required":["@type","offset"]},{"type":"object","properties":{"@type":{"type":"string","const":"AbsoluteTrigger"},"when":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d*[1-9])?Z$"}},"required":["@type","when"]},{"type":"object","properties":{"@type":{"type":"string"}},"required":["@type"],"additionalProperties":{}}]}},"required":["@type","trigger"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}},"timeZone":{"type":["string","null"]},"start":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])T([01]\\d|2[0-3]):[0-5]\\d:([0-5]\\d|60)(\\.\\d*[1-9])?$"},"duration":{"type":"string","pattern":"^P(?:(?:\\d+W(?:\\d+D)?|\\d+D)(?:T(?:\\d+H(?:\\d+M(?:\\d+(?:\\.\\d*[1-9])?S)?)?|\\d+M(?:\\d+(?:\\.\\d*[1-9])?S)?|\\d+(?:\\.\\d*[1-9])?S))?|T(?:\\d+H(?:\\d+M(?:\\d+(?:\\.\\d*[1-9])?S)?)?|\\d+M(?:\\d+(?:\\.\\d*[1-9])?S)?|\\d+(?:\\.\\d*[1-9])?S))$"},"status":{"type":"string","enum":["confirmed","cancelled","tentative"]},"uid":{"type":"string"}},"required":["@type","start"],"additionalProperties":false,"patternProperties":{"^(?:relatedTo|prodId|created|updated|sequence|method|descriptionContentType|showWithoutTime|virtualLocations|links|locale|keywords|categories|color|recurrenceId|recurrenceIdTimeZone|excludedRecurrenceRules|recurrenceOverrides|excluded|priority|freeBusyStatus|privacy|replyTo|sentBy|requestStatus|useDefaultAlerts|localizations|timeZones)$":{"description":"An RFC 8984 Event property this body does not type, any JSON (https://www.rfc-editor.org/rfc/rfc8984#section-4)."},"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$":{"description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused. RFC 8984 section 3.3's vendor-specific property, https://www.rfc-editor.org/rfc/rfc8984#section-3.3."}}}},"required":["organization_id","calendar_id","data"],"additionalProperties":false,"examples":[{"organization_id":"00000000-0000-7000-8000-000000000001","calendar_id":"00000000-0000-7000-8000-000000000005","data":{"@type":"Event","title":"예시 공장 line inspection","start":"2026-11-12T10:00:00","timeZone":"Asia/Seoul","duration":"PT1H","locations":{"plant":{"@type":"Location","name":"예시 공장, 경기도 예시시"}},"participants":{"00000000-0000-7000-8000-000000000002":{"@type":"Participant","name":"예시 공장","roles":{"attendee":true}}}}}]}}}},"responses":{"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue. A key of `data` that is no Event property, or `uid`, is refused naming it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`. Your memberships do not allow this row to be created: `forbidden`, with no `param`; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"2XX":{"description":"201, the event written; 200, a resend, the event as it stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.CalendarEventAnswer"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/calendar_events/{id}":{"get":{"tags":["conversation.calendar_events"],"summary":"Retrieve one calendar event.","description":"The row as the table holds it.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/conversation.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The calendar event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.CalendarEventAnswer"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"patch":{"tags":["conversation.calendar_events"],"summary":"Amend a calendar event.","description":"`data` merges shallowly, a null removing a key, so a nested value, `participants` among them, is sent whole: `{\"data\": {\"start\": \"2026-11-12T11:00:00\"}}` moves it, `{\"data\": {\"status\": \"cancelled\"}}` cancels it. Each key is judged as the create judges it; `@type` and `start` cannot be removed and `uid` cannot be sent. A change of `participants` copies its keys again into `metadata.membership_id`, and your policy judges the row as it stands and as it will be written. Writes `calendar_event.updated`. A moved start moves the `scheduledTime` of every open `InviteAction` naming the event in the same statement, each with its `action.updated` event; a participant added asks nobody, a participant removed keeps its `InviteAction`.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","propertyNames":{"anyOf":[{"enum":["@type","relatedTo","prodId","created","updated","sequence","method","title","description","descriptionContentType","showWithoutTime","locations","virtualLocations","links","locale","keywords","categories","color","recurrenceId","recurrenceIdTimeZone","recurrenceRules","excludedRecurrenceRules","recurrenceOverrides","excluded","priority","freeBusyStatus","privacy","replyTo","sentBy","participants","requestStatus","useDefaultAlerts","alerts","localizations","timeZone","timeZones","start","duration","status"]},{"pattern":"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$","description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused."}]},"additionalProperties":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}]}}},"required":["data"],"additionalProperties":false,"examples":[{"data":{"start":"2026-11-12T11:00:00"}}]}}}},"responses":{"200":{"description":"The calendar event as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.CalendarEventAnswer"}}}},"400":{"description":"The body refused by the door's schema, or no JSON: `invalid_request`, `param` the first issue's path, `message` every issue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`. A merge your policy refuses, as the row stands or as it would be written, answers the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}},"delete":{"tags":["conversation.calendar_events"],"summary":"Delete a calendar event.","description":"Writes its `.deleted` event, which keeps the row. Every open `InviteAction` naming it, `PotentialActionStatus` or `ActiveActionStatus`, is deleted with it, a dropped plan, each with its `action.deleted` event; while a finished one names it, `CompletedActionStatus` or `FailedActionStatus`, the meeting held at it, the event is not deleted and the answer is 409 `conflict` naming those actions. To call a meeting off and keep its record, `PATCH` `status` `cancelled`.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true}],"responses":{"200":{"description":"The calendar event as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.CalendarEventAnswer"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"409":{"description":"A unique, foreign key, restrict or check violation: `unique_violation`, `foreign_key_violation`, `restrict_violation` or `check_violation`, the condition's name, `message` naming the constraint; nothing is written. A finished `InviteAction` naming the event answers 409 `conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/events":{"get":{"tags":["conversation.events"],"summary":"List one page of events, newest first.","description":"`organization_id` narrows; `metadata[object_id]` narrows to the events of one row by its id, a deleted row's included. `event_at[gte]` (inclusive) and `event_at[lt]` (exclusive) narrow to a range of `event_at`; `limit` is 1 to 100; absent, 100.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/conversation.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":false},{"in":"query","name":"metadata","schema":{"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","type":"object","properties":{"object_id":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":["object_id"],"additionalProperties":false},"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","required":false,"style":"deepObject","explode":true},{"in":"query","name":"event_at[gte]","schema":{"$ref":"#/components/schemas/conversation.DateTime"},"required":false},{"in":"query","name":"event_at[lt]","schema":{"$ref":"#/components/schemas/conversation.DateTime"},"required":false}],"responses":{"200":{"description":"A bare array of events.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/conversation.Event"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/google":{"post":{"tags":["conversation.calendar_events"],"summary":"Start mirroring an organization's calendar events to your Google calendar.","description":"A page's form POST, as a person. A person whose memberships may not both read and update `conversation.calendar_events` of that organization is answered 302 to the page with `error` `forbidden` and no Google consent; on a hostname with no Google client or no key to seal the grant, with `error` `provider_unsupported`. Anyone else is answered 302 to Google for `openid` and `calendar.app.created` with `access_type=offline`, added to what you already granted, and the callback makes a secondary calendar named `jedger` in your Google account, or keeps the one this grant already names for that organization, and keeps the refresh token sealed in `identity.refresh_tokens`. From then on every create, change and delete of the organization's calendar events is pushed to that calendar, Google's event id the row's id without hyphens, and every hour a change made there comes back. A 302 to Google sets the `__Host-iam_oauth_state` and `__Host-iam_oauth_verifier` cookies for the hostname's `OAUTH_MAX_AGE`, and Google lands the browser on `GET /conversation/v1/google/callback`. Any other method is 405 `method_not_allowed` with `Allow: POST`.","parameters":[{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$","description":"The organization whose calendar events are mirrored, an `iam.organizations` id."},"required":true,"description":"The organization whose calendar events are mirrored, an `iam.organizations` id."},{"in":"query","name":"redirect_uri","schema":{"type":"string","description":"The full URL to come back to, admitted by the hostname's `REDIRECT_URI`."},"required":true,"description":"The full URL to come back to, admitted by the hostname's `REDIRECT_URI`."}],"responses":{"302":{"description":"302 to Google's consent, or to the page with `error`.","headers":{"Location":{"description":"Google's authorization endpoint, or the page with `error` `forbidden` or `provider_unsupported`.","schema":{"type":"string"}},"Set-Cookie":{"description":"`__Host-iam_oauth_state` and `__Host-iam_oauth_verifier`, on a 302 to Google alone.","schema":{"type":"string"}}}},"400":{"description":"No `organization_id`, one that is no UUID, no `redirect_uri`, or one the hostname's `REDIRECT_URI` does not admit: `invalid_request`, `param` the key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"An agent's session or a device: a Google calendar is a person's, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"405":{"description":"Any method but POST: `method_not_allowed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/google/callback":{"get":{"tags":["conversation.calendar_events"],"summary":"Google's redirect target; never called by hand.","description":"Google lands the browser here with `code` and `state`. The door checks `state` against the `__Host-iam_oauth_state` cookie, spends `code` for a token, judges your right in the organization again, makes or keeps the calendar and keeps the grant. Every outcome but the two refusals below is a 302 back to the page the start carried, both cookies cleared: with no `error` parameter, or with `error` set to `access_denied` (consent refused, or `calendar.app.created` not granted), `forbidden` (your memberships no longer allow it), `conflict` (two grants raced) or `server_error`.","parameters":[{"in":"query","name":"code","schema":{"description":"Google's authorization code.","type":"string"},"description":"Google's authorization code.","required":false},{"in":"query","name":"state","schema":{"description":"The `state` the start door minted.","type":"string"},"description":"The `state` the start door minted.","required":false},{"in":"query","name":"error","schema":{"description":"Present when the person declined.","type":"string"},"description":"Present when the person declined.","required":false}],"responses":{"302":{"description":"302 back to the page the start carried.","headers":{"Location":{"description":"The page the start carried, with `error` on a failure.","schema":{"type":"string"}},"Set-Cookie":{"description":"Both cookies cleared.","schema":{"type":"string"}}}},"400":{"description":"The `__Host-iam_oauth_state` or `__Host-iam_oauth_verifier` cookie is missing, the first is unequal to `state`, or the state carries no organization or no page: `state_invalid`, the cookies cleared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"An agent's session or a device: `forbidden`, the cookies cleared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"405":{"description":"Any method but `GET` and `HEAD`: `method_not_allowed`, `Allow: GET, HEAD`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/conversation/v1/events/{id}":{"get":{"tags":["conversation.events"],"summary":"Retrieve one event.","description":"`data` is the whole old row on `updated` and `deleted`.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/conversation.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/conversation.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.Event"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"403":{"description":"Your credential names no person, a device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conversation.ApiErrorBody"}}}}}}},"/artifact/v1/openapi.json":{"get":{"tags":["artifact.openapi"],"summary":"This document.","description":"Public, the same for every caller of one hostname.","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","headers":{"Cache-Control":{"description":"public, max-age=300","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string","const":"3.1.0"}},"required":["openapi"],"additionalProperties":{}}}}},"default":{"description":"A refusal: nothing the request asked for was written. The status says whose problem it is, `code` what to match on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/artifacts":{"get":{"tags":["artifact.artifacts"],"summary":"List releases, newest first.","description":"Any caller signed in, a person or a device. Narrowed by `program_name`, `target` and `version`; a device asks for the newest release of its program for its target with the first two. Newest first by each release's `artifact.created` event, one page of `limit`, 100 when absent, paged with `starting_after` or `ending_before`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"program_name","schema":{"type":"string","minLength":1,"maxLength":128},"required":false},{"in":"query","name":"target","schema":{"type":"string","minLength":1,"maxLength":128},"required":false},{"in":"query","name":"version","schema":{"type":"string","minLength":1,"maxLength":64},"required":false},{"in":"query","name":"name","schema":{"description":"The program's name under its old key, which jedgerd sends beside `program_name` with the same value; read by no statement, `program_name` narrows.","type":"string","minLength":1,"maxLength":128},"description":"The program's name under its old key, which jedgerd sends beside `program_name` with the same value; read by no statement, `program_name` narrows.","required":false}],"responses":{"200":{"description":"A bare array of releases.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/artifact.Artifact"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"post":{"tags":["artifact.artifacts"],"summary":"Register one release.","description":"A person's act. `data.key` must sit under `<program_name>/<version>/<target>/` as one file name, and comes with its `size`. In the same statement every `spec` deployment of the program, on a device whose `data.update_mode` is stated and is not `manual`, whose release is of the same target, moves onto the new release. A second register of one (`program_name`, `version`, `target`) is 409, so a rebuild takes a new `version`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ArtifactCreateRequest"}}}},"responses":{"201":{"description":"The release written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Artifact"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships. Nothing written: no program has this `program_name`, `data.key` is outside its prefix, or your policy does not admit `artifact:INSERT` on the row: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"A release of this (`program_name`, `version`, `target`) already exists: `unique_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/artifacts/{id}":{"get":{"tags":["artifact.artifacts"],"summary":"Retrieve one release: its row, its bytes or its install script, by `Accept`.","description":"`text/x-shellscript` (read first, so it wins beside octet-stream) answers the install script, the template filled with the release's `ARTIFACT_ID`, `NAME`, `VERSION` and `TARGET`, `Cache-Control: private, max-age=300`. `application/octet-stream` streams the bytes, to a person whose policy admits `artifact:SELECT` on the release, or to a device one of whose `spec` deployments points at it by `artifact_id` or by a `Parameters.artifact_id` of `data.onvif.org:AnalyticsModule`; one `Range` of the form `bytes=<first>-[<last>]` or `bytes=-<suffix>` that starts inside the object is a partial answer 206 with `Content-Range`, and any other `Range` (several ranges, a first byte past the end, a last before the first) or none is the whole, 200, never 416; each with `Accept-Ranges: bytes`, `Content-Length`, the `Content-Type` the object was stored with, `Content-Disposition: attachment` naming the key's last segment, and `Cache-Control: private, max-age=31536000, immutable`. Any other `Accept`, or none, answers the row as JSON. The row and the script are the catalogue's, any caller signed in. Verify `data.signature` before writing the bytes anywhere.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false},{"name":"Range","in":"header","required":false,"description":"On the bytes alone (`Accept: application/octet-stream`): `bytes=<first>-[<last>]` or `bytes=-<suffix>` (RFC 9110 section 14.2, https://www.rfc-editor.org/rfc/rfc9110#section-14.2) that starts inside the object answers that window, 206; any other value, several ranges and a first byte past the end among them, answers the whole object, 200, never 416.","schema":{"type":"string"}}],"responses":{"200":{"description":"The row, the bytes (200, or 206 for a `Range`) or the script.","headers":{"Cache-Control":{"description":"`private, max-age=300` on the script, `private, max-age=31536000, immutable` on the bytes; none on the row.","schema":{"type":"string"}},"Content-Range":{"description":"On a 206 alone: `bytes <first>-<last>/<the object's size>` (RFC 9110 section 14.4).","schema":{"type":"string"}},"Content-Disposition":{"description":"On the bytes: `attachment; filename=\"<the key's last segment>\"`, a `\"` or `\\` in it escaped with `\\` (RFC 9110 section 5.6.4).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Artifact"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No release has this `{id}`, the `{id}` is no UUID, or you may not fetch its bytes; for the bytes also a release that records no `data.key` and `data.size`, or whose object is not in the bucket: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/cards":{"get":{"tags":["artifact.cards"],"summary":"List the cards your policy reaches.","description":"Narrowed by `organization_id` and by any link: `artifact_id`, `deployment_id`, `device_credential_id`, `program_id`, `service_token_id`. One page of the cards your policy reaches, newest first by `id`, `limit` 100 when absent, paged with `starting_after` or `ending_before`; a page shorter than `limit` is the last.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"artifact_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"deployment_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"device_credential_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"program_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"service_token_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false}],"responses":{"200":{"description":"A bare array of cards.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/artifact.Card"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"post":{"tags":["artifact.cards"],"summary":"Make a card about rows of this schema.","description":"A person or a device, judged by its policy. The owner is the organization named; the rows it is about are named by their links. A link to a row that does not exist is 409. Writes `card.created`; a refused create is recorded as an `AccessDenied` event.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.CardCreateRequest"}}}},"responses":{"201":{"description":"The card written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Card"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"Your policy does not admit `artifact:INSERT` on this card: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html. A link to a row that does not exist is `foreign_key_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/cards/{id}":{"get":{"tags":["artifact.cards"],"summary":"Retrieve one card.","description":"A person or a device, judged by its policy.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The card.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Card"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"patch":{"tags":["artifact.cards"],"summary":"Change a card's data.","description":"A person or a device, judged by its policy. `data` merges shallowly, a `null` removing a key; the owner and the links never change. Writes `card.updated`.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.CardPatch"}}}},"responses":{"200":{"description":"The card as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Card"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"delete":{"tags":["artifact.cards"],"summary":"Delete a card.","description":"A person or a device, judged by its policy. Writes `card.deleted`. A card also dies with the row it is about.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"responses":{"200":{"description":"The card as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Card"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/deployments":{"get":{"tags":["artifact.deployments"],"summary":"List deployments.","description":"A person the rows its policy reaches, narrowed by `device_id` and `organization_id`; a device its own rows, spec and current. One page newest first, `limit` 100 when absent, paged with `starting_after` or `ending_before`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"device_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false}],"responses":{"200":{"description":"A bare array of deployments.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/artifact.Deployment"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"post":{"tags":["artifact.deployments"],"summary":"Declare a release on a device, or observe one.","description":"A person writes `spec`, a device its own `current` naming itself as `device_id`. A person's `spec` of `postgres` on a device whose `data.provider` is `planetscale`, or of `hyperdrive` on a device whose `metadata.runtime` is `Cloudflare-Workers`, makes the vendor's resource in the same request and writes its `current` row; a vendor refusal is 502 with the spec row standing. A hyperdrive `spec`'s `data.database_device_id` must name a PlanetScale device you read. On those two roads a hostname device that holds no `PLANETSCALE_SERVICE_TOKEN_ID` or `PLANETSCALE_SERVICE_TOKEN` row, or for hyperdrive no `CLOUDFLARE_API_TOKEN` row, is 500 `server_error` before anything is written. A person's `spec` of `cloudflared` on a device whose `metadata.runtime` is not `Cloudflare-Workers` also makes, in the same request, the device's Cloudflare Tunnel named `device-<device_id>` (https://developers.cloudflare.com/api/resources/zero_trust/subresources/tunnels/subresources/cloudflared/methods/create/), found by that name first so a second spec makes no second tunnel. A new tunnel's ingress sends `device-<device_id>.<zone>` paths `^/(conversation|artifact)/v1/` to `http://localhost:80` and `ssh-device-<device_id>.<zone>` to `ssh://localhost:22`; a found tunnel keeps its own ingress unless it has none. Each of the two hostnames gets a proxied CNAME to `<tunnel id>.cfargotunnel.com` if it has none. The device's `TUNNEL_TOKEN` row of `artifact.device_credentials` (`data` `{ name: \"TUNNEL_TOKEN\", LoadCredentialEncrypted: \"TUNNEL_TOKEN\" }`) is written through `POST /artifact/v1/device_credentials` as you, sealed to the last key of the device's `data.pkR`. A row that already stands is kept when the tunnel was found, and replaced when the tunnel is new. No `current` row is written, since jedgerd observes cloudflared itself. The spec row is pushed only after this step. Four refusals come before any row is written: a device that lists no `data.pkR` is 409 `invalid_request` on `device_id`; a hostname that already holds any other record is 409 `invalid_request` on `device_id`; a hostname device that holds no `CLOUDFLARE_TUNNEL_API_TOKEN` row is 500 `server_error`; and a Cloudflare refusal while reading is 502. A refusal after the spec row is written is 502, with the spec row standing. A person's written row is pushed to its device when jedger pushes to that device. A release that does not exist is 409. A person's `spec` of `video-content-analytics` (the release's `program_name`) has its `data` refused 400 when the program would idle on it: only `onvif.org:AnalyticsModule`, `ffmpeg.org:framerate` (a positive number) and `sensor_id` (a uuid), the modules each ONVIF's `{ Type, Name, Parameters }` (https://www.onvif.org/ver10/schema/onvif.xsd, `tt:Config`), either none (absent or `[]`) or exactly a `detector` named `RF-DETR` whose `Parameters` are `{ artifact_id }` alone and a `tracker` named `ByteTrack` with no `Parameters`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeploymentCreateRequest"}}}},"responses":{"201":{"description":"The deployment written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Deployment"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused. For a managed road also: the PlanetScale device's `data`, or the hyperdrive `spec`'s `data`, that does not match its schema; a hyperdrive `spec` on a device that is no Cloudflare device with `data.account_id` (`param` `device_id`); a `data.database_device_id` that names no PlanetScale device you read (`param` `data.database_device_id`); a video-content-analytics `spec`'s `data` outside its shape (`param` the path, `data.onvif.org:AnalyticsModule.0.Name`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"Nothing written: your policy does not admit the row, a person wrote `current`, or a device wrote `spec` or another device's row: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html. A release that does not exist is `foreign_key_violation`. On the `cloudflared` road also `invalid_request`, `param` `device_id`, before any row is written: the device lists no `data.pkR`, or a hostname of its tunnel already holds a record that is not that tunnel's CNAME.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"500":{"description":"`server_error` (the body says only where the text is logged), before anything is written: the hostname's device holds no token row the vendor road reads.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"502":{"description":"Cloudflare or PlanetScale refused making the resource: the vendor's own code, else `upstream_error`, `password_missing` or `role_not_ready`; the spec row stands, its `current` row unwritten.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/deployments/{id}":{"get":{"tags":["artifact.deployments"],"summary":"Retrieve one deployment.","description":"A person by its policy, a device its own row.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Deployment"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"patch":{"tags":["artifact.deployments"],"summary":"Move a deployment to another release, or change its data.","description":"A person patches `spec` rows, a device its own `current` row. The device and the status never change. A person's changed row is pushed to its device when jedger pushes to that device. A person's PATCH of a PlanetScale database's spec, one with a `current` row, observes the database afresh into that row; a hostname device holding no PlanetScale token row there is 500 `server_error`, the spec row patched. A patch is judged by the `data` keys it carries, with no read of the row: `onvif.org:AnalyticsModule` by the create's list rules and `ffmpeg.org:framerate` as a positive number, each or its `null` removal, whatever the program; any other key on a video-content-analytics row is the program's own to refuse.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeploymentPatch"}}}},"responses":{"200":{"description":"The deployment as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Deployment"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused. A `data.onvif.org:AnalyticsModule` or `data.ffmpeg.org:framerate` outside its shape (`param` the path).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`. A row of the status you do not write is the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html. A release that does not exist is `foreign_key_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"500":{"description":"`server_error` (the body says only where the text is logged): the hostname's device holds no PlanetScale token row the observation reads; the spec row is patched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"502":{"description":"PlanetScale refused the observation: the vendor's own code, else `upstream_error`; the spec row is patched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"delete":{"tags":["artifact.deployments"],"summary":"Delete a deployment.","description":"A person deletes `spec` rows, a device its own `current` row; the cards about it go with it. A person's delete of a managed device's spec row that has a `current` row deletes the vendor's resource it declared, the PlanetScale database, or the Hyperdrive config and its PlanetScale role, then that `current` row; a hostname device holding no token row that road reads is 500 `server_error`, the spec row deleted and its `current` row standing. A delete is pushed to no device.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"responses":{"200":{"description":"The deployment as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Deployment"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`. A row of the status you do not write is the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"500":{"description":"`server_error` (the body says only where the text is logged): the hostname's device holds no token row that road reads; the spec row is deleted and its `current` row stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"502":{"description":"The vendor refused the delete: its own code, else `upstream_error`; the spec row is deleted and its `current` row stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/device_credentials":{"get":{"tags":["artifact.device_credentials"],"summary":"List the values programs read.","description":"A person the rows its policy reaches, narrowed by `device_id` and `organization_id`; a device its own, the filters ignored. One page newest first, `limit` 100 when absent, paged with `starting_after` or `ending_before`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"device_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false}],"responses":{"200":{"description":"A bare array of credentials.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/artifact.DeviceCredential"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"post":{"tags":["artifact.device_credentials"],"summary":"Write one value a program reads.","description":"A person's act. One name per device, or per deployment, else 409. `deployment_id` names the `spec` deployment the value belongs to alone; absent or null, it is the device's own value.\n\nThe schema's checks JSON Schema cannot show, each 400 `invalid_request` on its `param`: `data` names its kind, `data.type` `plain_text`, `secret_text`, `hyperdrive` or `service`, systemd's `LoadCredential` or `LoadCredentialEncrypted`, or NetworkManager's `networkmanager.dev:keyfile`, a network the device may join, whose value is `data.name` (`param` `data`); a `secret_text`, `LoadCredentialEncrypted` or `networkmanager.dev:keyfile` `value` is sealed to the device's newest `data.pkR` before it is sent, base64 of HPKE `enc || ct`, 48 bytes or more (`value`); an `IDENTITY_SERVICE_TOKENS_` or `ARTIFACT_SERVICE_TOKENS_` name ends in the token's own id, its hyphens as underscores (`data.name`); `ORGANIZATION_ID`'s `value` is a uuid (`value`); `API_ORIGIN` with a `deployment_id` is refused, since the door writes it (`data.name`).\n\nToken names: `IDENTITY_SERVICE_TOKENS_<identity.service_tokens id>` names the agent a deployment runs as; the door reads that token through identity's door as you and writes its `user_id` into `metadata.user_id`, and a token you cannot read, or none of that id, is 400 on `data.name`. `ARTIFACT_SERVICE_TOKENS_<artifact.service_tokens id>` is the device's own token, written as any secret, nothing read.\n\n`ORGANIZATION_ID` with a `deployment_id` binds that deployment to an organization: the door writes the deployment's `API_ORIGIN` beside it in the same statement, the value of that organization's `Cloudflare-Workers` device's own `API_ORIGIN` row, and an organization with no such row is 400 on `value`, neither row written. Without a `deployment_id`, `ORGANIZATION_ID` binds nothing and is written as any value.\n\nThe row written is pushed to its device when jedger pushes to that device.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeviceCredentialCreateRequest"}}}},"responses":{"201":{"description":"The credential written, `{ id, device_id, deployment_id, value, data, metadata }`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeviceCredential"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused. Also an `IDENTITY_SERVICE_TOKENS_<id>` you cannot read (`param` `data.name`), and an `ORGANIZATION_ID` whose organization has no hostname `API_ORIGIN` (`param` `value`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships. Your policy does not admit `artifact:INSERT` on the row: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html. A second row of one name on one device or one deployment is `unique_violation`; a deployment of another device `foreign_key_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/device_credentials/{id}":{"get":{"tags":["artifact.device_credentials"],"summary":"Retrieve one value.","description":"A person by its policy, a device its own row.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The credential.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeviceCredential"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"patch":{"tags":["artifact.device_credentials"],"summary":"Change a value.","description":"A person patches `data` and `value`; a device its own row's `value` alone, a device's patch carrying `data` changing nothing and answering 404. A person's changed row is pushed to its device when jedger pushes to that device; the device's notice of a change is the row's `device_credential.updated` event.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeviceCredentialPatch"}}}},"responses":{"200":{"description":"The credential as written, `{ id, device_id, deployment_id, value, data, metadata }`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeviceCredential"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused. A patch that would leave the row with no kind, or a sealed row with a value that is no base64 of `enc || ct` of at least 48 bytes, is refused on `data`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"delete":{"tags":["artifact.device_credentials"],"summary":"Delete a value.","description":"A person's act, the cards about it going with it; a rotation is a new row and the delete of the old.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"responses":{"200":{"description":"The credential as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeviceCredential"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/devices":{"get":{"tags":["artifact.devices"],"summary":"List devices.","description":"A person the rows its policy reaches, narrowed by `organization_id`; a device its own. One page newest first, `limit` 100 when absent, paged with `starting_after` or `ending_before`. `?id=<uuid>&id=<uuid>` (1 to 100 ids, never beside `organization_id`) reads devices you hold the ids of, each narrowed to `id` and `data`'s `name` and `hostname`, of your own organizations alone (a device's own organization, or every organization a person holds a membership in), in `id` order and no page; an id outside them is left out as an id that matches nothing is.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"id","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":false}],"responses":{"200":{"description":"A bare array of devices.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/artifact.Device"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"post":{"tags":["artifact.devices"],"summary":"Make a device.","description":"A person's act, owned by the organization named. Its secret is a second request, `POST /artifact/v1/service_tokens`. Writes `device.created`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.DeviceCreateRequest"}}}},"responses":{"201":{"description":"The device written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Device"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships. Your policy does not admit `artifact:INSERT` on the row: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/devices/{id}":{"get":{"tags":["artifact.devices"],"summary":"Retrieve one device, or sign a device in.","description":"With a JWT: the row, a person by its policy, a device its own; a hostname's Workers device, one whose own row's `metadata.runtime` is `Cloudflare-Workers`, reads any device: its own row whole, another's with `data` narrowed to `name`, `hostname`, `provider`, `server_type` and `location`. With a service token's secret as the bearer and no JWT: the device's sign-in, the row with a device JWT on `Authentication-Info` (RFC 7615 section 3, https://www.rfc-editor.org/rfc/rfc7615#section-3), `token=\"<device JWT>\", expires_in=<seconds>`; a secret that opens nothing is 401 whether the secret is wrong or the id absent. This door alone stands outside the gate, so the secret is spent nowhere else. Every other arm answers the whole row, its `data` included, so a device reads its own settings, `onvif.org:OutputLevel`, `openid.net:locale` and `schema.org:duration`, off the answer to its sign-in with no further call; a key the row does not hold is absent. The device JWT carries `openid.net:locale` under the claim `jedger.com:data`.","security":[{"userJwt":[]},{"deviceJwt":[]},{"userJwtCookie":[]},{"serviceToken":[]}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The device.","headers":{"Authentication-Info":{"description":"On the sign-in alone: `token=\"<device JWT>\", expires_in=<seconds>`.","schema":{"type":"string"}},"Cache-Control":{"description":"On the sign-in alone: `no-store`, since the answer carries a token (RFC 6749 section 5.1).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Device"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, a JWT expired, forged or unknown, or a service token's secret that opens nothing for this `{id}` (a malformed `{id}` among them): `invalid_token`.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"patch":{"tags":["artifact.devices"],"summary":"Change a device's data.","description":"A person's PATCH merges `data`, by its policy, and writes `device.updated`; a `null` removes a key. `data.hostname` and `data.runtime` are set at create and never by a person's PATCH, a value or its `null`: either is 400 `param` naming it, for every person, since jedgerd sends an agent's service token to `https://api.<data.hostname>` of a hub row. A device's settings are three keys of `data`: `onvif.org:OutputLevel`, the speaker's volume, an integer from 0 to 100; `openid.net:locale`, the language it speaks, a BCP 47 tag; and `schema.org:duration`, the silence that closes its session, an ISO 8601 duration such as `PT30S`; any other value of any of them is 400. An agent's PATCH, a credential whose `act` is not its `sub`, names those three keys and no other: any other key of `data` is 403 `forbidden`, `param` naming it, and nothing is written, since a policy grants a row whole and cannot say it. A device, with its own JWT, sends `{\"data\":{\"pkR\":[…],\"lan_address\":\"…\",\"hostname\":\"…\"}}` alone, each key optional and any other key 400, on its own row: its public keys appended, its LAN address replaced, its host name replaced (RFC 1123 section 2.1, https://datatracker.ietf.org/doc/html/rfc1123#section-2.1; its own id since 2026-11-03, and the key the push to the device reads); a PATCH that changes nothing answers the row as it stood and writes no event. A hostname's Workers device, one whose own row's `metadata.runtime` is `Cloudflare-Workers`, writes nothing of its own row: 403 `forbidden`, and the event says `AccessDenied`.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/artifact.DevicePatch"},{"$ref":"#/components/schemas/artifact.DeviceSelfPatch"}]}}}},"responses":{"200":{"description":"The device as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Device"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"An agent's PATCH naming a key of `data` other than `onvif.org:OutputLevel`, `openid.net:locale` and `schema.org:duration`: `forbidden`, `param` the key. A hostname's Workers device's PATCH of its own row: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`. A device's PATCH of another device's row is the same.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"delete":{"tags":["artifact.devices"],"summary":"Delete a device and everything it owns.","description":"A person's act: its credentials, deployments, service tokens and the cards about each go in the same statement, each with its event. Deleting its service tokens alone revokes it.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"responses":{"200":{"description":"The device as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Device"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/events":{"get":{"tags":["artifact.events"],"summary":"List one page of events, newest first.","description":"A person's read, by its policy. `organization_id` narrows; `metadata[object_id]` narrows to the events of one row by its id, a deleted row's included. `event_at[gte]` (inclusive) and `event_at[lt]` (exclusive) narrow to a range of `event_at`. One page newest first, `limit` 100 when absent, paged with `starting_after` or `ending_before`. Any other query key is 400.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"metadata","schema":{"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","type":"object","properties":{"object_id":{"$ref":"#/components/schemas/artifact.Uuid"}},"required":["object_id"],"additionalProperties":false},"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","required":false,"style":"deepObject","explode":true},{"in":"query","name":"event_at[gte]","schema":{"$ref":"#/components/schemas/artifact.DateTime"},"required":false},{"in":"query","name":"event_at[lt]","schema":{"$ref":"#/components/schemas/artifact.DateTime"},"required":false}],"responses":{"200":{"description":"A bare array of events.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/artifact.Event"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/events/{id}":{"get":{"tags":["artifact.events"],"summary":"Retrieve one event.","description":"A person's read, by its policy. `metadata.object_id` names the row an event is about, even after the row is deleted.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Event"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/programs":{"get":{"tags":["artifact.programs"],"summary":"List the catalogue.","description":"Public to anyone signed in. Narrowed by `organization_id`. One page newest first, `limit` 100 when absent, paged with `starting_after` or `ending_before`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false}],"responses":{"200":{"description":"A bare array of programs.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/artifact.Program"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"post":{"tags":["artifact.programs"],"summary":"Add a program to the catalogue.","description":"A person's act, owned by the organization named. A name already taken is 409. Writes `program.created`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ProgramCreateRequest"}}}},"responses":{"201":{"description":"The program written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Program"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships. Your policy does not admit `artifact:INSERT` on the row: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html. A name already taken is `unique_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/programs/{id}":{"get":{"tags":["artifact.programs"],"summary":"Retrieve one program.","description":"Public to anyone signed in. No door changes a program.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The program.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Program"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No program has this `{id}`, or the `{id}` is no UUID: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/registrations":{"get":{"tags":["artifact.registrations"],"summary":"List the domain names your policy reaches.","description":"A person or a device, by its policy. Narrowed by `organization_id`. One page newest first, `limit` 100 when absent, paged with `starting_after` or `ending_before`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":false}],"responses":{"200":{"description":"A bare array of registrations.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/artifact.Registration"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"post":{"tags":["artifact.registrations"],"summary":"Buy one domain name, or record one the account already holds.","description":"A person's act, and it may spend jedger's money; every row is jedger's. Before anything is bought: your policy must admit `artifact:INSERT` on `artifact.registrations` (else 403) and no row may hold the name (else 409 `unique_violation`). A name jedger's Cloudflare account already holds is then recorded as Cloudflare holds it, nothing bought, no `state` and no `pricing`; to record only, send `max_price` `\"0\"`. For a name it does not hold: Cloudflare must call the name registrable (else 409 under Cloudflare's `reason`, such as `domain_unavailable`); and the first year's `pricing.registration_cost` must not exceed `max_price` (else 400 `invalid_request` on `max_price`). Then Cloudflare registers it, the door waits up to 30 s for the workflow, and writes the row: `data.state` is `succeeded` when complete, `in_progress` or `action_required` when Cloudflare is still working. A workflow that `failed` or was `blocked` writes no row, 502. Three faults are 500 `server_error`: the hostname device names no `data.account_id`, is no `Cloudflare-Workers` device, or holds no `CLOUDFLARE_REGISTRAR_API_TOKEN` row, checked before Cloudflare is asked anything; the judgment refused the row and the create then wrote it, in a transaction rolled back, nothing bought or kept; and a name the account now holds whose row is then refused, the name held and unrecorded, Cloudflare's answer in the Worker's log.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.RegistrationCreateRequest"}}}},"responses":{"201":{"description":"The registration written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Registration"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused. Also the first year costs more than `max_price`: `invalid_request`, `param` `max_price`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships. Your policy does not admit the row: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"A row holds the name already: `unique_violation`. Cloudflare will not register it: Cloudflare's own `reason`, else `domain_unavailable`, `param` `data.domain_name`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"500":{"description":"`server_error` (the body says only where the text is logged): one of the three faults above.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"502":{"description":"Cloudflare refused a call (its own code, else `upstream_error`), quoted no price (`upstream_error`), or its workflow failed or was blocked (its error code, else `registration_failed` or `registration_blocked`); nothing is recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/registrations/{id}":{"get":{"tags":["artifact.registrations"],"summary":"Retrieve one registration.","description":"A person or a device, by its policy. No door changes a registration.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The registration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.Registration"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/service_tokens":{"get":{"tags":["artifact.service_tokens"],"summary":"List device secrets' rows.","description":"A person the rows its policy reaches, narrowed by `device_id`; a device its own. One page newest first, `limit` 100 when absent, paged with `starting_after` or `ending_before`. Each row is `{ id, device_id, metadata }`: the secret is never answered after its create, nor its hash.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/artifact.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"device_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false}],"responses":{"200":{"description":"A bare array of service tokens.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"device_id":{"$ref":"#/components/schemas/artifact.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","device_id","metadata"],"additionalProperties":false}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"post":{"tags":["artifact.service_tokens"],"summary":"Mint a device secret.","description":"A person for a device its policy reaches, or a device for itself, to rotate: create the new, switch, delete the old. The answer carries `secret` beside the row, and on `Authentication-Info`, the one time it is shown. Spend it only at `GET /artifact/v1/devices/{id}`. A hostname's Workers device, one whose `metadata.runtime` is `Cloudflare-Workers`, gets a token only from a person whose policy also admits it as if the device stood in jedger's own organization, as its create is judged; never from an agent, a credential whose `act` is not its `sub`, and never from a device, itself included.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ServiceTokenCreateRequest"}}}},"responses":{"201":{"description":"The row with `secret`, `{ id, device_id, metadata, secret }`.","headers":{"Authentication-Info":{"description":"`token=\"<the secret>\"`, the same secret as the body's `secret`.","schema":{"type":"string"}},"Cache-Control":{"description":"`no-store`, since the answer carries the secret (RFC 6749 section 5.1).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ServiceTokenCreated"}}}},"400":{"description":"The body is no JSON or does not match its schema: `invalid_request`, `param` naming the first field refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"403":{"description":"Your policy does not admit the row, a device named another device, or a hostname's Workers device you may not mint for: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/artifact/v1/service_tokens/{id}":{"get":{"tags":["artifact.service_tokens"],"summary":"Retrieve one device secret's row.","description":"A person by its policy, a device its own row.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/artifact.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The row, `{ id, device_id, metadata }`, no secret.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"device_id":{"$ref":"#/components/schemas/artifact.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","device_id","metadata"],"additionalProperties":false}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}},"delete":{"tags":["artifact.service_tokens"],"summary":"Revoke a device secret.","description":"A person by its policy; a device may delete its own, its last one included, which revokes it. The cards about it go with it.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/artifact.Uuid"},"required":true}],"responses":{"200":{"description":"The row as it stood, `{ id, device_id, metadata }`.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"device_id":{"$ref":"#/components/schemas/artifact.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","device_id","metadata"],"additionalProperties":false}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"409":{"description":"Postgres refused the write, answered under its condition's name: `restrict_violation` (SQLSTATE 23001), `foreign_key_violation` (23503), `unique_violation` (23505) or `check_violation` (23514), https://www.postgresql.org/docs/current/errcodes-appendix.html.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/artifact.ApiErrorBody"}}}}}}},"/design/v1/openapi.json":{"get":{"tags":["design.openapi"],"summary":"This document.","description":"Public, the same for every caller of one hostname. GET and HEAD alone; any other method is 405 `method_not_allowed` with `Allow: GET, HEAD`.","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","headers":{"Cache-Control":{"description":"public, max-age=300","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string","const":"3.1.0"}},"required":["openapi"],"additionalProperties":{}}}}},"default":{"description":"A refusal: nothing the request asked for was written. The status says whose problem it is, `code` what to match on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/design/v1/pages":{"get":{"tags":["design.pages"],"summary":"List pages: those your memberships reach, a thread's group, or the one page a name stands for.","description":"Three arms. `thread_id` alone: the pages of that conversation thread's organization holding one of the thread's `schema.org:keywords`, for a caller the thread admits (else 404), the read before writing a retrospect page; a page naming a `schema.org:maintainer` or a `w3.org:audience` is among them only when your own policy admits it, every other one by the thread's admission alone; a thread with no keywords answers `[]`. This arm takes no filter of the list, only the page: `limit` and the two cursors, read as the list reads them, so a group of more than 100 pages is read page by page. `organization_id` with `source_url` alone: the one page that organization's redirect of that name targets, `[{\"design\": {\"pages\": …, \"attachments\": […]}, \"iam\": {\"organizations\": …}}]` (the answer of `GET /pages/{id}`) or `[]`, a public page to anyone and any other to a caller whose policy admits it, `iam.organizations` `null` when you send no credential or your memberships do not reach the organization. Otherwise the pages your memberships reach, narrowed by `organization_id`, `lang`, one `keywords` and `metadata[schema.org:about]`, repeated per value, the pages about any of those values, a membership id or an address `iam/cards/<id>` or `iam/organizations/<id>` (a membership's memory page among them). The list arm and the `thread_id` arm answer a page, newest first: `limit` rows (1 to 100; absent, 100), page with `starting_after` or `ending_before`. The `source_url` arm is a lookup by key: it answers whole, takes neither cursor, and takes a `limit` without reading it. On the list and `thread_id` arms a row's `updated_at` is written to the millisecond, so it is no `ETag`; the `source_url` arm writes it to the microsecond, as `GET /pages/{id}` does.","security":[{"userJwt":[]},{"deviceJwt":[]},{"userJwtCookie":[]},{}],"parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/design.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/design.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"lang","schema":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"required":false},{"in":"query","name":"keywords","schema":{"type":"string","minLength":1,"maxLength":128},"required":false},{"in":"query","name":"metadata","schema":{"type":"object","properties":{"schema.org:about":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/design.Uuid"},{"type":"string","pattern":"^iam\\/(cards|organizations)\\/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}]},{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/design.Uuid"},{"type":"string","pattern":"^iam\\/(cards|organizations)\\/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}]}}],"externalDocs":{"url":"https://schema.org/about"}}},"additionalProperties":false},"required":false,"style":"deepObject","explode":true},{"in":"query","name":"thread_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"source_url","schema":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^[^\\s?#]+$"},"required":false}],"responses":{"200":{"description":"A bare array of pages; on the `source_url` arm, of at most one page with its organization.","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/design.Page"}},{"type":"array","items":{"$ref":"#/components/schemas/design.PageWithOrganization"}}]}}}},"400":{"description":"A query parameter refused, how each is named below. `thread_id` beside `organization_id`, `lang`, `keywords`, `metadata[schema.org:about]` or `source_url` (it takes `limit`, `starting_after` and `ending_before` and no filter), or `source_url` without `organization_id` or with any key but it and `limit`, a cursor among them: `invalid_request`, `param` `thread_id` or `source_url`. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"The list arm or the `thread_id` arm with no credential, or one expired or forged: `invalid_token`. The `source_url` arm answers such a request as a visitor's.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"The `thread_id` arm: no such thread, or conversation's door refuses it to you: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"post":{"tags":["design.pages"],"summary":"Make a page.","description":"One page per group, every language in it: a second language is a PATCH, never a second page. `data[\"schema.org:name\"]` is the title in `lang`; `data[\"schema.org:keywords\"]` the group. Three tags, one meaning each: `schema.org:about`, whom the page describes, each `iam/cards/<id>`, a card of the page's organization you may read (`GET /iam/v1/cards/{id}`), `iam/organizations/<id>`, the page's own organization, or a membership id the organization keeps a card about; each other tag a list of membership ids: `schema.org:maintainer`, who edits it and so reads it, holding your own id where your policy names `${PrincipalTag/membership_id}`; `w3.org:audience`, who else reads it. A page naming none of the three is public; a page with a maintainer must name whom it is about. The answer's `id` gives the address `https://design.<zone>/<lang>/pages/<id>`. It carries no `ETag`: read the page by id before its first PATCH.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.PageCreateRequest"}}}},"responses":{"201":{"description":"The page written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.Page"}}}},"400":{"description":"The body refused, no JSON, a missing or unknown key (`metadata` among them) or a wrong value: `invalid_request`, `param` the dotted path of a missing or malformed field, `message` naming an unknown key. A membership both in `schema.org:maintainer` and in `w3.org:audience`: `invalid_request`, `param` `w3.org:audience`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"`forbidden`, naming no cause: your policy refuses `design:INSERT` on the page as it will be written, or does not let you name its `schema.org:maintainer` or `w3.org:audience`; a `schema.org:about` value naming a card you may not read or of another organization, another organization, or a membership the organization keeps no card about; or a `schema.org:maintainer` with no `schema.org:about`. The refused write is recorded as an `AccessDenied` event. A device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"409":{"description":"`organization_id` names no organization: `foreign_key_violation`, the message naming `pages_organization_id_fkey`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"413":{"description":"A body past 2097152 bytes, this door's own ceiling: `payload_too_large`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/design/v1/pages/{id}":{"get":{"tags":["design.pages"],"summary":"Retrieve one page with its organization.","description":"Answers `{\"design\": {\"pages\": <page>, \"attachments\": [<each file of the page whose data names a schema.org:thumbnail>]},\"iam\": {\"organizations\": <the organization, its name, logo and addresses in its data>}}`: the files ride in the page's own statement, so a player of the page draws its poster with no second request, and a file with no thumbnail is read from `GET /attachments?page_id=`. `iam.organizations` is `null` when you send no credential or your memberships do not reach the organization. A public page to anyone; a page naming people to them and to the organization's staff. `organization_id` answers 404 for a page another organization owns, as a site reads for its hostname's organization alone.","security":[],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/design.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The page, rows under table names.","headers":{"ETag":{"description":"The page's entity-tag, `\"<updated_at>\"`, the row's `updated_at` as this answer writes it, to the microsecond (RFC 9110 section 8.8.3, https://www.rfc-editor.org/rfc/rfc9110#section-8.8.3); Cloudflare's edge may weaken it to `W/\"<updated_at>\"` when it compresses the answer (https://developers.cloudflare.com/cache/reference/etag-headers/). Send it as read in a PATCH's `If-Match`.","schema":{"type":"string"}},"Allow":{"description":"The methods your policy admits on the page as it stands (RFC 9110 section 10.2.1, https://www.rfc-editor.org/rfc/rfc9110#section-10.2.1): `GET`, then `PATCH` when it admits `design:UPDATE` and `DELETE` when it admits `design:DELETE`; a device or a visitor reads `GET` alone. A PATCH is judged again as the page will be written.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.PageWithOrganization"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"patch":{"tags":["design.pages"],"summary":"Change a page: its content, a language, its title, keywords or people.","description":"`data` merges shallowly: `sections` and `localizations` each replace whole, so send every language a page holds when adding one, each with its `schema.org:name`. `schema.org:name` retitles, `schema.org:keywords` replaces the group (`null` removes), `schema.org:about` replaces whom the page describes, `schema.org:maintainer` and `w3.org:audience` replace who edits it and who else reads it (`null` removes any of the three). `organization_id` never changes. The PATCH is conditional (RFC 6585 section 3, https://www.rfc-editor.org/rfc/rfc6585#section-3): send in `If-Match` the `ETag` header your last `GET /design/v1/pages/{id}` or PATCH of this page answered, as read. A page changed since answers 409 `conflict`: read it again and send the change once more. The answer carries the page's new `ETag`; take the header, never the body's `updated_at`, which a PATCH, a create and a list write to the millisecond.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true},{"name":"If-Match","in":"header","required":true,"description":"One entity-tag, the page's `ETag` as read: `\"<updated_at>\"`, or `W/\"<updated_at>\"` as Cloudflare's edge weakens it when it compresses an answer (https://developers.cloudflare.com/cache/reference/etag-headers/); either is compared by the value inside the quotes (RFC 9110 section 13.1.1, https://www.rfc-editor.org/rfc/rfc9110#section-13.1.1). Never a list, never `*`.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.PagePatch"}}}},"responses":{"200":{"description":"The page as written.","headers":{"ETag":{"description":"The page's new entity-tag, `\"<updated_at>\"` to the microsecond: the `If-Match` of the next PATCH.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.Page"}}}},"400":{"description":"The body refused, no JSON, a missing or unknown key (`metadata` among them) or a wrong value: `invalid_request`, `param` the dotted path of a missing or malformed field, `message` naming an unknown key. An `If-Match` that is no single entity-tag, a list among them, or one whose quoted value is no timestamp: `invalid_request`, `param` `If-Match`. A membership both in `schema.org:maintainer` and in `w3.org:audience` of the page as it will stand, the stored tags merged with the patch: `invalid_request`, `param` `w3.org:audience`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No page has this `{id}`, `{id}` is no UUID, or the statement refused the patch, which answers as a page you may not change does: your policy refuses `design:UPDATE` on the page as it stands or as it will be written, or does not let you name the `schema.org:maintainer` or `w3.org:audience` you send; a `schema.org:about` value naming a card you may not read or of another organization, another organization, or a membership the organization keeps no card about; or a page left with a maintainer and no `schema.org:about`. `resource_missing`; a refused patch of a page that exists is recorded as an `AccessDenied` event in its organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"409":{"description":"The page changed after the read your `If-Match` names: `conflict`. Read it again and send the change with its new `ETag`. The attempt writes no event, nor does a patch refused 400 for the merged tags: a policy allowed both, and `AccessDenied` is a request no policy allows (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_access-denied.html).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"413":{"description":"A body past 2097152 bytes, this door's own ceiling: `payload_too_large`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"428":{"description":"No `If-Match`, or `If-Match: *`: `precondition_required`, `param` `If-Match`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"delete":{"tags":["design.pages"],"summary":"Delete a page.","description":"Its files go first in the same statement, each an `attachment.deleted` event, their bytes kept in the bucket. A redirect still targeting it then answers a page that is gone: retarget or delete its names first.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true}],"responses":{"200":{"description":"The page as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.Page"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, `{id}` is no UUID, or your policy refuses `design:DELETE` on the row as it stands: `resource_missing`. A refused write of a row that exists is recorded as an `AccessDenied` event in its organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/design/v1/attachments":{"get":{"tags":["design.attachments"],"summary":"List one page of the files your memberships reach, newest first.","description":"The rows, never the bytes: a row's file is `GET /attachments/{id}`. A file is listed when your policy admits `design:SELECT` on it as its page, judged over its own `metadata`, the page's copy; a public page's file you may not otherwise read is not listed, though anyone may fetch it by id. `id` reads one file's row. Narrowed by `organization_id`, `page_id`, and `media_type` repeated per type, the files of any of them (`?media_type=audio/mpeg` for the sounds); `limit` rows (the list rule of the description), page with `starting_after` or `ending_before`. A person's list is one `attachments.listed` event.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/design.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/design.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"id","schema":{"description":"The one file's row, since `GET /attachments/{id}` answers its bytes.","$ref":"#/components/schemas/design.Uuid"},"description":"The one file's row, since `GET /attachments/{id}` answers its bytes.","required":false},{"in":"query","name":"organization_id","schema":{"description":"The organization the files belong to, the page's.","$ref":"#/components/schemas/design.Uuid"},"description":"The organization the files belong to, the page's.","required":false},{"in":"query","name":"page_id","schema":{"description":"The page that shows the files, `design.pages.id`.","$ref":"#/components/schemas/design.Uuid"},"description":"The page that shows the files, `design.pages.id`.","required":false},{"in":"query","name":"media_type","schema":{"description":"The files of these media types, the parameter repeated per type: image/webp, image/png, image/jpeg, image/svg+xml, video/mp4, audio/mpeg.","minItems":1,"maxItems":6,"type":"array","items":{"type":"string","enum":["image/webp","image/png","image/jpeg","image/svg+xml","video/mp4","audio/mpeg"]}},"description":"The files of these media types, the parameter repeated per type: image/webp, image/png, image/jpeg, image/svg+xml, video/mp4, audio/mpeg.","required":false}],"responses":{"200":{"description":"A bare array of files' rows, `size` a number of octets.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/design.AttachmentAnswer"}}}}},"400":{"description":"A query parameter refused, how each is named below. A `media_type` none of image/webp, image/png, image/jpeg, image/svg+xml, video/mp4, audio/mpeg: `invalid_request`, `param` `media_type`. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired or forged: `invalid_token`.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"post":{"tags":["design.attachments"],"summary":"Make one file of a page: with its bytes, or waiting for them.","description":"Two bodies, told apart by `Content-Type`. The file's raw bytes, at most 10485760 bytes, of one of `image/webp`, `image/png`, `image/jpeg`, `image/svg+xml`, `video/mp4`, `audio/mpeg` (WebP preferred for an image), the query naming the page, the file's name and, when you mint it, its id, a uuidv7. Or `application/json`, `{page_id, filename?, id?, media_type, data?}`: a row that waits for its bytes, `size` null, `media_type` the type they will have; `PUT /attachments/{id}` brings them later. `data` is the file's own words: its title, a memo, its thumbnail and the AI SDK call that makes it (the schema below). A person whose policy admits `design:UPDATE` on the page; the file's `metadata` is the page's, so it is read by exactly whoever reads the page, and every PATCH of the page rewrites it with the page's. The answer's `Location` is the file's URL, the one a page's Markdown names.","parameters":[{"in":"query","name":"page_id","schema":{"description":"The page that shows the file, `design.pages.id`.","$ref":"#/components/schemas/design.Uuid"},"required":true,"description":"The page that shows the file, `design.pages.id`."},{"in":"query","name":"filename","schema":{"description":"The name the file is answered under, `Content-Disposition`'s `filename`.","type":"string","minLength":1,"maxLength":998},"description":"The name the file is answered under, `Content-Disposition`'s `filename`.","required":false},{"in":"query","name":"id","schema":{"description":"The row's id, minted by the caller as a uuidv7; absent, the statement mints one.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"description":"The row's id, minted by the caller as a uuidv7; absent, the statement mints one.","required":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.AttachmentCreateBody"}},"image/webp":{},"image/png":{},"image/jpeg":{},"image/svg+xml":{},"video/mp4":{},"audio/mpeg":{}}},"responses":{"201":{"description":"The file's row written; `size` null when it waits for its bytes.","headers":{"Location":{"description":"The file's URL, `/design/v1/attachments/<id>` (RFC 9110 section 10.2.2, https://www.rfc-editor.org/rfc/rfc9110#section-10.2.2).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.AttachmentAnswer"}}}},"400":{"description":"An empty body, or JSON the shape refuses (a `media_type` outside the list, an unknown `data` key, a second AI SDK recipe): `invalid_request`. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"`forbidden`, `param` `page_id`: no page has this `page_id`, your policy refuses `design:UPDATE` on it, or `data`'s `schema.org:thumbnail` names no image of it; a refusal of a page that exists is recorded as an `AccessDenied` event in its organization. A device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"409":{"description":"An `id` another file holds: `unique_violation`, the message naming `attachments_pkey`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"413":{"description":"A body past 10485760 bytes, refused as its bytes arrive: `payload_too_large`. The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"415":{"description":"A `Content-Type` that is neither JSON nor one of image/webp, image/png, image/jpeg, image/svg+xml, video/mp4, audio/mpeg: `unsupported_media_type`, `param` `Content-Type`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"502":{"description":"R2 refused the bytes: `bad_gateway`; the row is deleted again with its `attachment.deleted` event, so nothing is kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/design/v1/attachments/{id}":{"get":{"tags":["design.attachments"],"summary":"Stream a file's bytes.","description":"To whoever may read its page: a public page's file to anyone, no JWT needed, when the page is public now and this hostname's organization owns it, any other to a caller whose policy admits `design:SELECT` on it as its page. The object with the row's `media_type`, `Range` honoured with 206 and `Content-Range` (RFC 9110 section 14.2, https://www.rfc-editor.org/rfc/rfc9110#section-14.2), shown `inline` (RFC 6266). A signed-in read writes one `attachment.retrieved` event for the read a playback starts with, no `Range`, one from byte 0 or a suffix, and none for a later range of the same file. `HEAD` answers the same status and headers with no body, how a page learns why a file did not draw. A row waiting for its bytes answers 404. A PUT may replace the bytes under the same id, so a reader stores them and asks again: `If-None-Match` holding the ETag answers 304 with no body (RFC 9110 section 13.1.2, https://www.rfc-editor.org/rfc/rfc9110#section-13.1.2).","security":[{"userJwt":[]},{"deviceJwt":[]},{"userJwtCookie":[]},{}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/design.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false},{"name":"Range","in":"header","required":false,"description":"One byte range (RFC 9110 section 14.2), answered 206 with `Content-Range`.","schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"description":"The ETag a reader holds: 304, no body, while the bytes are the same.","schema":{"type":"string"}}],"responses":{"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired or forged, and a file that is no public page's of this hostname's organization: `invalid_token`; signing in may admit you.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`. With a credential, a file your policy does not admit answers the same, and so does a row waiting for its bytes or whose bytes the bucket does not hold.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"416":{"description":"A `Range` that starts past the file's end (RFC 9110 section 15.5.17, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.17): `parameter_too_large`, `param` `Range`, with `Content-Range: bytes */<size>`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"2XX":{"description":"The bytes, 200, or 206 for a `Range`.","headers":{"Content-Type":{"description":"The row's `media_type`.","schema":{"type":"string"}},"Content-Length":{"description":"The bytes answered: the file's, or the range's on a 206.","schema":{"type":"string"}},"Content-Security-Policy":{"description":"`sandbox` on every answer: a file opened in place, an SVG among them, runs no script and has no origin (https://www.w3.org/TR/CSP3/#directive-sandbox).","schema":{"type":"string"}},"X-Content-Type-Options":{"description":"`nosniff` on every answer: the browser takes `Content-Type` as declared (https://fetch.spec.whatwg.org/#x-content-type-options-header).","schema":{"type":"string"}},"Accept-Ranges":{"description":"`bytes`.","schema":{"type":"string"}},"ETag":{"description":"The object's ETag in the bucket.","schema":{"type":"string"}},"Cache-Control":{"description":"`public, no-cache` with no credential, `private, no-cache` with one: stored, and asked again with its ETag.","schema":{"type":"string"}},"Content-Disposition":{"description":"`inline`, with `filename` and, for a name outside ASCII, `filename*` (RFC 6266 section 4.3, RFC 8187); `attachment` for an SVG a navigation asks for (`Sec-Fetch-Dest` `document`, `iframe`, `frame`, `embed` or `object`), so it is saved and never shown as a page of this origin.","schema":{"type":"string"}},"Vary":{"description":"`Sec-Fetch-Dest` on an SVG, whose `Content-Disposition` it chooses.","schema":{"type":"string"}},"Content-Range":{"description":"On a 206 alone: `bytes <first>-<last>/<size>`.","schema":{"type":"string"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"patch":{"tags":["design.attachments"],"summary":"Change a file's name or its data: its title, memo, thumbnail or recipe.","description":"JSON, `{filename?, data?}`. `data` merges shallowly, each key written whole, a key sent `null` removed; `filename` `null` removes the name. `schema.org:thumbnail` names another file of the same page, an image. At most one AI SDK recipe key stands on a file. A person whose policy admits `design:UPDATE` on the file as its page; the answer is the row as written, one `attachment.updated` event.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.AttachmentPatch"}}}},"responses":{"200":{"description":"The file's row as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.AttachmentAnswer"}}}},"400":{"description":"The body refused, no JSON, a missing or unknown key (`metadata` among them) or a wrong value: `invalid_request`, `param` the dotted path of a missing or malformed field, `message` naming an unknown key. A thumbnail that is no other image of the page, or a recipe beside the row's own: `invalid_request`, `param` `data`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No file has this `{id}`, `{id}` is no UUID, or your policy refuses `design:UPDATE` on its page: `resource_missing`. A refused change of a file that exists is recorded as an `AccessDenied` event in its organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"put":{"tags":["design.attachments"],"summary":"Put or replace a file's bytes.","description":"The body is the file's raw bytes, at most 10485760 bytes, `Content-Type` the row's own `media_type`: a waiting row takes its file, a filled one has it replaced under the same id. `size` is set; nothing else of the row changes. A person whose policy admits `design:UPDATE` on the file as its page; one `attachment.updated` event.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true}],"requestBody":{"required":true,"content":{"image/webp":{},"image/png":{},"image/jpeg":{},"image/svg+xml":{},"video/mp4":{},"audio/mpeg":{}}},"responses":{"200":{"description":"The file's row as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.AttachmentAnswer"}}}},"400":{"description":"An empty body: `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No file has this `{id}`, `{id}` is no UUID, or your policy refuses `design:UPDATE` on its page: `resource_missing`; a refusal of a file that exists is recorded as an `AccessDenied` event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"413":{"description":"A body past 10485760 bytes, refused as its bytes arrive: `payload_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"415":{"description":"A `Content-Type` outside the list, or another than the row's own `media_type`: `unsupported_media_type`, `param` `Content-Type`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"502":{"description":"R2 refused the bytes: `bad_gateway`; the row takes back the size it had.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"delete":{"tags":["design.attachments"],"summary":"Delete a page's file.","description":"A person whose policy admits `design:UPDATE` on the file as its page. The object stays in the bucket, so its `attachment.deleted` event can restore it. Take its Markdown link out of the page too.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true}],"responses":{"200":{"description":"The file's row as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.AttachmentAnswer"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No file has this `{id}`, `{id}` is no UUID, or your policy refuses `design:UPDATE` on its page: `resource_missing`. A refused delete of a file that exists is recorded as an `AccessDenied` event in its organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/design/v1/redirects":{"get":{"tags":["design.redirects"],"summary":"Retrieve the redirect of a source URL, or list the redirects your memberships reach.","description":"Two arms, chosen by whether the query carries `source_url`. With it: that one row, to anyone, or 404; `organization_id` beside it follows only that organization's row, as a site does, and no other key is taken. Without it: one page of the rows your memberships reach, narrowed by `organization_id`, newest first: `limit` rows (the list rule of the description), page with `starting_after` or `ending_before`.","security":[{"userJwt":[]},{"deviceJwt":[]},{"userJwtCookie":[]},{}],"parameters":[{"in":"query","name":"source_url","schema":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^[^\\s?#]+$"},"required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/design.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/design.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false}],"responses":{"200":{"description":"With `source_url` the row, else a bare array of rows.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/design.Redirect"},{"type":"array","items":{"$ref":"#/components/schemas/design.Redirect"}}]}}}},"400":{"description":"A query parameter refused, how each is named below. With `source_url`, any key but `organization_id`, the list keys among them: `parameter_unknown`, `param` that key. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"The list arm, without `source_url`, with no credential, or one expired or forged: `invalid_token`. The `source_url` arm answers anyone.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"The `source_url` arm: no redirect has this `source_url`, or none of this `organization_id`'s: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"post":{"tags":["design.redirects"],"summary":"Make a short link or a name for a page.","description":"`source_url` is a lower-case host and a path, `jam.jedger.com/c`, unique across jedger. A page's name targets the page's id URL with the language in its path and answers 302.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.RedirectCreateRequest"}}}},"responses":{"201":{"description":"The redirect written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.Redirect"}}}},"400":{"description":"The body refused, no JSON, a missing or unknown key (`metadata` among them) or a wrong value: `invalid_request`, `param` the dotted path of a missing or malformed field, `message` naming an unknown key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"Your policy refuses `design:INSERT` on the redirect as it will be written: `forbidden`, the refused write recorded as an `AccessDenied` event. A device's JWT: `user_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"409":{"description":"`source_url` is taken: `unique_violation`, the message naming `redirects_source_url_key`. `organization_id` names no organization: `foreign_key_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/design/v1/redirects/{id}":{"get":{"tags":["design.redirects"],"summary":"Retrieve one redirect.","description":"Public: a link is printed for anyone to follow. `organization_id` answers 404 for a redirect another organization owns.","security":[],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/design.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The redirect.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.Redirect"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No redirect has this `{id}`, or `{id}` is no UUID: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"patch":{"tags":["design.redirects"],"summary":"Retarget a redirect, or move its source; or count one use of it.","description":"Two arms, chosen by the body. A person's: `data` merges shallowly, so publishing a page's next edition is `{\"data\": {\"target_url\": \"...\"}}` alone; `data.schema.org:interactionStatistic` is read-only, so a body may carry it as read and its value is ignored. A use: exactly `{\"data\": {\"schema.org:interactionStatistic\": {\"@type\": \"InteractionCounter\", \"interactionType\": \"https://schema.org/UseAction\"}}}`, which a site sends after it follows the row: the door adds one to `userInteractionCount` in its statement (https://schema.org/InteractionCounter), takes the site's own device JWT as `Authorization: Bearer`, counts a public redirect of one of that device's own organizations alone, and changes no other key; it records `redirect.updated`, the row as it stood, with no `sub` or `act`, so `GET /events?redirect_id={id}` lists each use with its time. The site names the visitor in `Forwarded` and passes the visitor's `User-Agent` on, so that event's `source_ip_address` and `user_agent` are the visitor's. The same body without a device JWT is the person's arm: none is 401, a person's is judged as any PATCH. Send it only for a use made.","security":[{"userJwt":[]},{"deviceJwt":[]},{"userJwtCookie":[]},{}],"parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true},{"name":"Forwarded","in":"header","required":false,"description":"A use only: `for=<the visitor's IP address>` (RFC 7239 section 4, https://www.rfc-editor.org/rfc/rfc7239#section-4; an IPv6 address quoted in brackets, section 6). It is believed only beside a verified device JWT, since anyone may write the header; with no device JWT, a user JWT or an obfuscated `for=` (`_hidden`, `unknown`) it is ignored and the event's `source_ip_address` is the request's own, Cloudflare's `CF-Connecting-IP`.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/design.RedirectPatch"},{"$ref":"#/components/schemas/design.RedirectUsePatch"}]}}}},"responses":{"200":{"description":"The redirect as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.Redirect"}}}},"400":{"description":"The body refused, no JSON, a missing or unknown key (`metadata` among them) or a wrong value: `invalid_request`, `param` the dotted path of a missing or malformed field, `message` naming an unknown key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired or forged: `invalid_token`; a use is a device's.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, `{id}` is no UUID, or your policy refuses `design:UPDATE` on the row as it stands or as it will be written: `resource_missing`. A refused write of a row that exists is recorded as an `AccessDenied` event in its organization. A use: no public redirect in one of the device's own organizations has this `{id}`: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"409":{"description":"The new `source_url` is taken: `unique_violation`, the message naming `redirects_source_url_key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}},"delete":{"tags":["design.redirects"],"summary":"Delete a redirect.","description":"The table has no status column; an undo writes the row again.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true}],"responses":{"200":{"description":"The redirect as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.Redirect"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`; this door judges a person's memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, `{id}` is no UUID, or your policy refuses `design:DELETE` on the row as it stands: `resource_missing`. A refused write of a row that exists is recorded as an `AccessDenied` event in its organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/design/v1/events":{"get":{"tags":["design.events"],"summary":"List one page of events, newest first.","description":"A person's read. `organization_id` narrows, and `redirect_id` to one redirect's events, each counted use of it a `redirect.updated` whose `event_at` is when it happened; `metadata[object_id]` narrows to the events of one row by its id, a deleted row's included. `event_at[gte]` (inclusive) and `event_at[lt]` (exclusive) narrow to a range of `event_at`; `limit` rows (the list rule of the description); page with `starting_after` or `ending_before`.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/design.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/design.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"redirect_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"metadata","schema":{"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","type":"object","properties":{"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["object_id"],"additionalProperties":false},"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","required":false,"style":"deepObject","explode":true},{"in":"query","name":"event_at[gte]","schema":{"$ref":"#/components/schemas/design.DateTime"},"required":false},{"in":"query","name":"event_at[lt]","schema":{"$ref":"#/components/schemas/design.DateTime"},"required":false}],"responses":{"200":{"description":"A bare array of events.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/design.Event"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`. Events are a person's read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/design/v1/events/{id}":{"get":{"tags":["design.events"],"summary":"Retrieve one event.","description":"`metadata.object_id` names the row an event is about, even after the row is deleted.","parameters":[{"in":"path","name":"id","schema":{"$ref":"#/components/schemas/design.Uuid"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/design.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.Event"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"403":{"description":"A device's JWT: `user_required`. Events are a person's read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/design.ApiErrorBody"}}}}}}},"/iam/v1/openapi.json":{"get":{"tags":["iam.openapi"],"summary":"This document.","description":"Needs no credential: a document about the doors is no row.","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","headers":{"Cache-Control":{"description":"public, max-age=300","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string","const":"3.1.0"}},"required":["openapi"],"additionalProperties":{}}}}},"405":{"description":"Any method but `GET` and `HEAD`: `method_not_allowed`, `Allow: GET, HEAD`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/organizations":{"get":{"tags":["iam.organizations"],"summary":"List the organizations your memberships reach.","description":"Narrow to one with `organization_id`; its name, logo and addresses are its `data`. One page, newest first: `limit` (1 to 100; absent, 100), `starting_after` the last id you hold for older, `ending_before` the first for newer. A page shorter than `limit` is the last.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false}],"responses":{"200":{"description":"A bare array of organizations.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/iam.Organization"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"post":{"tags":["iam.organizations"],"summary":"Create an organization.","description":"Writes the organization, its `data` (default `{\"kind\": \"org\"}`), and its `anon` post in one statement. No statement founds an organization today, so expect 403.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.OrganizationCreateRequest"}}}},"responses":{"201":{"description":"The organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Organization"}}}},"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key. A Card naming a logo is the same 400, `param` `data.media.<id>.uri`: a new organization names its logo by a PATCH, once its files stand under its id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"Your memberships do not allow this row to be created: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A constraint refused the row, under its own name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/organizations/{id}":{"get":{"tags":["iam.organizations"],"summary":"Retrieve one organization.","description":"The row as your memberships may read it.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/iam.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Organization"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"patch":{"tags":["iam.organizations"],"summary":"Change an organization with a JSON Merge Patch of its data.","description":"`data` is an RFC 7396 JSON Merge Patch of the Card, e.g. `{\"data\":{\"name\":{\"full\":\"RAFA\"}}}`. The door reads the row as your policy may update it, merges, validates the merged Card whole, and writes it only while the row still stands as read.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.OrganizationPatch"}}}},"responses":{"200":{"description":"The organization after the merge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Organization"}}}},"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key. The merged Card refused is the same 400, `param` its path inside `data`; so is a logo naming another organization's files, `param` `data.media.<id>.uri`, whose `uri` must be this organization's own `logo.svg` of `GET /iam/v1/organizations/{id}/{file}`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"`conflict`: the organization changed after the door read it, or your policy does not admit it as the patch would leave it; read it again, and if it stands as you read it, the change itself is refused. A constraint refused the row, under its own name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"delete":{"tags":["iam.organizations"],"summary":"Delete an organization.","description":"Refused while any other row or event names it, which is always once it has history.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"responses":{"200":{"description":"The organization as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Organization"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A row or an event still names it: `restrict_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/organizations/{id}/{file}":{"get":{"tags":["iam.organizations"],"summary":"Retrieve one file of an organization's logo.","description":"Needs no credential: a logo is public. `logo.svg` is the SVG the Card's `media` logo names by this URL; the others are made from it once and stored beside it: `logo-32x32.png` for a tab, `logo-180x180.png` for iOS's home screen, `logo-192x192.png` and `logo-512x512.png` for an installed app, `favicon.ico` with 16 and 32 px frames. `HEAD` answers the same headers with no body. Read from the bucket alone, never a row; every method but `GET` and `HEAD` is 405.","security":[],"parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true},{"in":"path","name":"file","schema":{"$ref":"#/components/schemas/iam.OrganizationFile"},"required":true},{"name":"If-None-Match","in":"header","required":false,"description":"The `ETag` you hold: answered 304 with no body when the file is unchanged (RFC 9110 section 13.1.2).","schema":{"type":"string"}}],"responses":{"200":{"description":"The file's bytes.","headers":{"Content-Type":{"description":"The stored file's own: `image/svg+xml`, `image/png` or `image/vnd.microsoft.icon`.","schema":{"type":"string"}},"ETag":{"description":"The object's ETag in the bucket.","schema":{"type":"string"}},"Cache-Control":{"description":"`public, max-age=3600`: the URL stays the same when the logo changes, so it is revalidated by its `ETag` once that many seconds have passed.","schema":{"type":"string"}},"X-Content-Type-Options":{"description":"`nosniff`: the browser takes `Content-Type` as declared (https://fetch.spec.whatwg.org/#x-content-type-options-header).","schema":{"type":"string"}},"Content-Security-Policy":{"description":"`sandbox`: an SVG opened in place runs no script and has no origin (https://www.w3.org/TR/CSP3/#directive-sandbox).","schema":{"type":"string"}}},"content":{"image/*":{"schema":{}}}},"404":{"description":"`{id}` is no UUID, `{file}` is none of the six names, or the organization has no such file: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"405":{"description":"Any method but `GET` and `HEAD`: `method_not_allowed`, `Allow: GET, HEAD`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/memberships":{"get":{"tags":["iam.memberships"],"summary":"List the memberships you may see, or one actor's effective policy.","description":"Narrow with `organization_id`, `user_id` (repeated) and `metadata[<key>]=<value>` (repeated, every tag must match; `true`/`false` are booleans), e.g. `?organization_id=&metadata[sub]={user id}` for a person's membership and their agents'. One page, newest first: `limit` (1 to 100; absent, 100), `starting_after` the last id you hold for older, `ending_before` the first for newer. A page shorter than `limit` is the last. `?act={user id}&returning=policy` answers instead one actor's effective policy as one document, with no page: every other documented parameter is read and not used, and an undocumented one is refused as on the list, every statement carrying its organization: your own, or another's where you may read its memberships.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"user_id","schema":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":false},{"in":"query","name":"metadata","schema":{"type":"object","propertyNames":{"anyOf":[{"type":"string","const":"sub"},{"type":"string","const":"act"},{"type":"string","pattern":"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$"}]},"additionalProperties":{"type":"string"}},"required":false,"style":"deepObject","explode":true},{"in":"query","name":"act","schema":{"x-jedger.com:filter":false,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"returning","schema":{"x-jedger.com:filter":false,"type":"string","const":"policy"},"required":false}],"responses":{"200":{"description":"A bare array of memberships, or one policy document.","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/iam.Membership"}},{"$ref":"#/components/schemas/iam.MembershipData"}]}}}},"400":{"description":"A query parameter refused, how each is named below. Also `organization_id`, a `user_id` or `act` that is no UUID, a `metadata[<key>]` named twice, `act` without `returning=policy` (`param` `returning`), and `returning=policy` without `act` (`param` `act`). A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"On `?act=&returning=policy` alone: another actor's policy, where your own policy grants `iam:SELECT` on none of that actor's memberships: `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"post":{"tags":["iam.memberships"],"summary":"Create a membership, optionally with the card about it.","description":"Omit `user_id` for an empty membership, such as a customer or a supplier: `{\"organization_id\":\"<uuid>\"}` alone writes one, born holding `{\"Version\":\"2012-10-17\",\"Statement\":[]}` when `data` is absent, its `metadata` holding `organization_id` and `membership_id` and no `user_id`, no `device_id`, no `api_version`. The info and sales back offices' grant admits that membership alone (RULED by the user 2026-11-05, \"only empty memberships, no user and no device\"), so their POST naming a `user_id` or any `data` is 403 `forbidden` and writes nothing; the AdministratorAccess holder may send either. `card` writes the organization's card about it, its addresses in its `data`, in the same statement. A device's POST is the sign-in's: no `data`, answered 200 with the membership already held.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.MembershipCreateRequest"}}}},"responses":{"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key. A device's POST carrying `data` is refused the same, `param` `data`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"`forbidden`: your memberships do not allow this row to be created; or `user_id` names an agent whose person holds no membership in the organization, or the body carries `data` for an agent, whose membership holds the empty document; or a back office, whose grant covers an empty membership alone, names a `user_id` or sends any `data`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A constraint refused the row: `unique_violation` for a second membership of one user in one organization (on a device's POST, one a racing request wrote: send again), `foreign_key_violation` for a user or an organization that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"2XX":{"description":"201 with the membership written and `card`, the card written, null when none was sent; a device's POST answers 200 with the membership already held, in the same shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.MembershipCreated"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/memberships/{id}":{"get":{"tags":["iam.memberships"],"summary":"Retrieve one membership.","description":"The row as your memberships may read it.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/iam.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The membership.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Membership"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"patch":{"tags":["iam.memberships"],"summary":"Change a membership's policy or holder, or attach your proven addresses.","description":"The AdministratorAccess holder's arm: `data`, the whole inline policy, replaced whole; `user_id` or `device_id` sets the holder of an empty membership or replaces the one it has, `null` empties it (its cards stay, their proofs leave); a patch names one holder, `user_id` or `device_id`, never both (400, `param` `device_id`). Emptying a person's membership, or giving it another holder, empties their agents' memberships of the organization in the same statement. Self arm: `uri` alone attaches addresses proven on the cards about your own membership, replaces its `uri` list, and fills every invitation of the organization waiting on those addresses. An agent's own `data` never changes: give it a post its person holds.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.MembershipPatch"}}}},"responses":{"200":{"description":"The membership after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Membership"}}}},"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key. A patch naming no key is the same 400. `uri` with any other key is refused the same, `param` `uri`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"The self arm alone, `forbidden`: a device sent `uri`, the membership is not yours, or an address is not proven on a card about it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`. On the AdministratorAccess holder's arm, a membership that is or would become an agent's is the same 404 when the patch carries `data`, when its person holds no other membership in the organization, or when it holds a post that membership does not; so is a `device_id` naming no device, `param` `device_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A constraint refused the row: `unique_violation` for a user who already holds a membership in the organization, `foreign_key_violation` for a `user_id` that names no user, `check_violation` for a `user_id` on a membership a device holds or a `device_id` on one a user holds, or when the self arm's fill would give a membership more than twenty posts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"delete":{"tags":["iam.memberships"],"summary":"Delete a membership with its joins and the cards about it.","description":"Each card and join goes under your own `iam:DELETE` on it, every row with its `.deleted` event; a person's membership takes their agents' memberships of the organization, with their cards and joins, in the same statement. To remove only the person and keep the cards, `PATCH` with `{\"user_id\": null}` instead.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"responses":{"200":{"description":"The membership as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Membership"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A card or a join your policy may not delete still names the membership: `restrict_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/posts":{"get":{"tags":["iam.posts"],"summary":"List the posts of the organizations you may see.","description":"Narrow with `organization_id`. Each post's name is its `data[\"schema.org:name\"]`. One page, newest first: `limit` (1 to 100; absent, 100), `starting_after` the last id you hold for older, `ending_before` the first for newer. A page shorter than `limit` is the last.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false}],"responses":{"200":{"description":"A bare array of posts.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/iam.Post"}}}}},"400":{"description":"A query parameter refused, how each is named below. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"post":{"tags":["iam.posts"],"summary":"Create a post with its policy document.","description":"Writes the post, its name in `data` beside the policy: `{\"Version\": \"2012-10-17\", \"Statement\": [...], \"schema.org:name\": \"…\"}`. Two tags ride top-level beside `data`, each under a statement of yours naming it: `\"ietf.org:mailbox\": [\"info@example.com\"]`, the addresses mail reaches its holders at, and `\"keycloak.org:defaultGroup\": true`, which makes it a default group: every person's sign-in in its organization joins it beside `anon` (https://www.keycloak.org/docs/latest/server_admin/#proc-specifying-default-groups_server_administration_guide). An AdministratorAccess holder's act.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.PostCreateRequest"}}}},"responses":{"201":{"description":"The post.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Post"}}}},"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"`forbidden`: your memberships do not allow this row to be created; or its `data[\"schema.org:name\"]` is the name of one of jedger's three posts, `AdministratorAccess`, `anon` or `ReadOnlyAccess` (`param` `data.schema.org:name`), refused before any statement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A constraint refused the row, under its own name: `foreign_key_violation` for an organization that does not exist, `check_violation` for an `ietf.org:mailbox` no list of lowercase addr-specs each named once, `unique_violation` for an address another post holds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/posts/{id}":{"get":{"tags":["iam.posts"],"summary":"Retrieve one post.","description":"The row as your memberships may read it.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/iam.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The post.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Post"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"patch":{"tags":["iam.posts"],"summary":"Replace a post's policy document.","description":"`data` is the whole document, every statement it keeps, its name included; a new name is copied onto every join's `metadata[\"schema.org:name\"]` in the same statement. `ietf.org:mailbox`, top-level beside `data`, replaces the post's addresses whole, `null` removes them, and alone is the one patch one of jedger's three posts takes. `\"keycloak.org:defaultGroup\": true`, top-level too, makes the post a default group (https://www.keycloak.org/docs/latest/server_admin/#proc-specifying-default-groups_server_administration_guide): every person's sign-in in its organization joins it beside `anon`, a membership that lacks it taking it on its next sign-in, never an agent's or an empty membership, within the twenty-post quota; `null` removes the tag and leaves the joins it made. None of jedger's three posts takes it (403). An AdministratorAccess holder's act.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.PostPatch"}}}},"responses":{"200":{"description":"The post after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Post"}}}},"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key. A patch naming no key is the same 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"`forbidden`: the post is one of jedger's three, `AdministratorAccess`, `anon` or `ReadOnlyAccess`, found under your policy and left as it stood, by any patch but `ietf.org:mailbox` alone; or the patch's `data[\"schema.org:name\"]` is one of their names (`param` `data.schema.org:name`), refused before the row is read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A constraint refused the row, under its own name: `check_violation` for an `ietf.org:mailbox` no list of lowercase addr-specs each named once, `unique_violation` for an address another post holds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"delete":{"tags":["iam.posts"],"summary":"Delete a post.","description":"Refused while a membership holds it: delete the joins first. The three posts jedger keeps are never deleted.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"responses":{"200":{"description":"The post as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Post"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"`forbidden`: the post is one of jedger's three, `AdministratorAccess`, `anon` or `ReadOnlyAccess`, found under your policy and left as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A membership still holds it: `restrict_violation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/membership_posts":{"get":{"tags":["iam.membership_posts"],"summary":"List which membership holds which post.","description":"Narrow with `organization_id` and `metadata[<key>]=<value>` (repeated, every tag must match), e.g. `?organization_id=&metadata[schema.org:name]=support` for the support staff; `true`/`false` are booleans. A row with `membership_id: null` is an invitation waiting for `metadata.uri`. One page, newest first: `limit` (1 to 100; absent, 100), `starting_after` the last id you hold for older, `ending_before` the first for newer. A page shorter than `limit` is the last.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"metadata","schema":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$"},"additionalProperties":{"type":"string"}},"required":false,"style":"deepObject","explode":true}],"responses":{"200":{"description":"A bare array of joins.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/iam.MembershipPost"}}}}},"400":{"description":"A query parameter refused, how each is named below. Also a `metadata[<key>]` named twice. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"post":{"tags":["iam.membership_posts"],"summary":"Give a membership a post, or invite by address.","description":"Send exactly one of `membership_id`, or `uri` (a `mailto:` list) for an invitation that fills when a membership attaches those proven addresses.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.MembershipPostCreateRequest"}}}},"responses":{"201":{"description":"The join.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.MembershipPost"}}}},"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key. Both `membership_id` and `uri`, or neither, is refused the same, `param` `uri`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"`forbidden`: your memberships do not allow this join; an agent's membership would hold a post its person's membership does not; `post_id` names no post, `organization_id` is not the post's, or `membership_id` names no membership of the post's organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A constraint refused the row: `check_violation` past twenty posts, `unique_violation` for a post the membership already holds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/membership_posts/{id}":{"get":{"tags":["iam.membership_posts"],"summary":"Retrieve one join.","description":"The row as your memberships may read it.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/iam.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The join.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.MembershipPost"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"delete":{"tags":["iam.membership_posts"],"summary":"Take a post from a membership, or withdraw an invitation.","description":"A join is never patched (`PATCH` is 405): delete it and insert another. Taking a post from a person's membership takes it from their agents' memberships of the organization in the same statement.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"responses":{"200":{"description":"The join as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.MembershipPost"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/cards":{"get":{"tags":["iam.cards"],"summary":"List the cards you may see.","description":"Narrow with `organization_id` and `membership_id` (repeated), and look for plain text in every card you may read with `query`. `metadata[jedger.com:back_office]=true` lists the cards that configure a back office (a model and the device that runs it), `metadata[jedger.com:front_office]=true` the card of the organization's front office (a model and no device), each one lookup on the metadata index; the statement computes both tags and no request sends them. `?membership_id={id}` is everything the organization keeps about that membership, the person's card and any configuration card. A card's `ai-sdk.dev:instructions` is left out unless you may also update it. One page, newest first: `limit` (1 to 100; absent, 100), `starting_after` the last id you hold for older, `ending_before` the first for newer. A page shorter than `limit` is the last.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"$ref":"#/components/schemas/iam.Uuid"},"required":false},{"in":"query","name":"membership_id","schema":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/iam.Uuid"}},"required":false},{"in":"query","name":"query","schema":{"description":"Plain text looked for in every card you may read, in its name.full, its phones' numbers, its emails' addresses, its addresses and its organizations' names, the company a person works for, case-insensitive, any part of the value. A number matches typed with or without separators, and +82 or 0 alike: 010-1234-5678, 01012345678 and +82 10 1234 5678 all find tel:+821012345678. Stripe's word.","x-jedger.com:filter":false,"type":"string","minLength":1,"maxLength":200},"description":"Plain text looked for in every card you may read, in its name.full, its phones' numbers, its emails' addresses, its addresses and its organizations' names, the company a person works for, case-insensitive, any part of the value. A number matches typed with or without separators, and +82 or 0 alike: 010-1234-5678, 01012345678 and +82 10 1234 5678 all find tel:+821012345678. Stripe's word.","required":false},{"in":"query","name":"metadata","schema":{"description":"Stripe's metadata form, one parameter per key: `metadata[jedger.com:back_office]=true`, the cards that configure a back office (a model and the device that runs it), or `metadata[jedger.com:front_office]=true`, the card of the organization's front office (a model and no device); `false` asks for the cards without the tag. The statement computes both tags. Every key is one `@>` on the GIN index.","type":"object","propertyNames":{"type":"string","enum":["jedger.com:back_office","jedger.com:front_office"]},"additionalProperties":{"type":"string","enum":["true","false"]}},"description":"Stripe's metadata form, one parameter per key: `metadata[jedger.com:back_office]=true`, the cards that configure a back office (a model and the device that runs it), or `metadata[jedger.com:front_office]=true`, the card of the organization's front office (a model and no device); `false` asks for the cards without the tag. The statement computes both tags. Every key is one `@>` on the GIN index.","required":false,"style":"deepObject","explode":true}],"responses":{"200":{"description":"A bare array of cards, newest first.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/iam.Card"}}}}},"400":{"description":"A query parameter refused, how each is named below. Also an unknown key, and any key but `membership_id` named twice. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"post":{"tags":["iam.cards"],"summary":"Create a card about a membership.","description":"For a customer the first time you learn a lasting fact, with `\"w3.org:audience\": \"support\"` so the support staff read it. `data` is the Card: `name.full`, `language`, `phones` (`{\"<id>\": {\"number\": \"tel:+821012345678\"}}`, the country code first), `emails` (`{\"<id>\": {\"address\": \"jane@example.com\"}}`), …. Beside the Card's own properties, at its top level, a key of your own under its owner's prefix, `example.com:note`, takes any JSON value and is read by no statement (RFC 9553 section 1.8.1's vendor-specific property); any other key the Card does not name is refused, naming it, and a merge patch adds, changes or removes yours as any other. What only people read goes on the membership's memory page in design.pages, never the card. `id` is optional: absent, the door mints it and the 201 names it; a uuidv7 you send is kept, so a restore writes the row again under its id.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.CardCreateRequest"}}}},"responses":{"201":{"description":"The card.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Card"}}}},"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"`forbidden`: your memberships do not allow this card to be created, a `w3.org:audience` your statements do not name among them; or, for an agent, the card is about its own membership (`param` `membership_id`), its `data` holds `ai-sdk.dev:model` (`param` `data.ai-sdk.dev:model`), or it holds any other configuration key (`param` `data`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A constraint refused the row: `unique_violation` for an `id` already taken, `foreign_key_violation` for a membership that is not the organization's or an organization that does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/cards/{id}":{"get":{"tags":["iam.cards"],"summary":"Retrieve one card.","description":"The row as your memberships may read it, `ai-sdk.dev:instructions` left out unless you may also update the card.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/iam.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The card.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Card"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"patch":{"tags":["iam.cards"],"summary":"Change a card with a JSON Merge Patch of its data.","description":"`data` is an RFC 7396 JSON Merge Patch: objects merge key by key, `null` removes a key, so send only what changes, e.g. one phone `{\"data\":{\"phones\":{\"<id>\":{\"number\":\"tel:+821012345678\"}}}}` or a name `{\"data\":{\"name\":{\"full\":\"Kim Minji\"}}}`. The door reads the card as your policy may update it, merges, validates the merged Card whole, and writes it only while the card still stands as read. `w3.org:audience` replaces the card's audience, `null` removes it. A person changes their own card. A card still holding `notes` is refused (400) until a patch removes them, `{\"data\":{\"notes\":null}}`.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.CardPatch"}}}},"responses":{"200":{"description":"The card after the merge.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Card"}}}},"400":{"description":"The body refused, `invalid_request`: no JSON, a missing or unknown key (`metadata` among them), a wrong type or value; `param` is its dotted path. A key named twice in one object is refused the same, `param` the key. A patch naming no key, or a merged Card refused, is the same 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"An agent alone, `forbidden`: the card is about its own membership (`param` `membership_id`); the card holds `ai-sdk.dev:model` as it stands or as the merge would leave it, whatever the patch changes, `w3.org:audience` alone included (`param` `data.ai-sdk.dev:model`); or the patch sets, changes or removes a configuration key (`param` `data`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`. A patch without `data` that your policy does not admit is the same 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"409":{"description":"A patch with `data`, `conflict`: the card changed after the door read it, or your policy does not admit it as the patch would leave it (a `w3.org:audience` your statements do not name, say); read it again, and if it stands as you read it, the change itself is refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"413":{"description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}},"delete":{"tags":["iam.cards"],"summary":"Delete a card about a membership.","description":"Under your memberships' `iam:DELETE` on the card.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true}],"responses":{"200":{"description":"The card as it stood.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Card"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"An agent alone, `forbidden`: the card is about its own membership (`param` `membership_id`), holds `ai-sdk.dev:model` (`param` `data.ai-sdk.dev:model`), or holds any other configuration key (`param` `data`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy refuses this write on the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/events":{"get":{"tags":["iam.events"],"summary":"List the iam events you may see, newest first.","description":"One page, newest first: `limit` (1 to 100; absent, 100), `starting_after` the last id you hold for older, `ending_before` the first for newer. A page shorter than `limit` is the last. Narrow with `organization_id`, and to a range of `event_at` with `event_at[gte]` (inclusive) and `event_at[lt]` (exclusive). Every event of one row carries `metadata.object_id`, so `metadata[object_id]` narrows to the events of one row by its id, a deleted row's included.","parameters":[{"in":"query","name":"limit","schema":{"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","x-jedger.com:filter":false,"default":100,"type":"integer","minimum":1,"maximum":100},"description":"The number of rows in the page, 1 to 100; absent, 100. Stripe's word.","required":false},{"in":"query","name":"starting_after","schema":{"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the last row of the page held: the page below it, the older rows, newest first. Stripe's word.","required":false},{"in":"query","name":"ending_before","schema":{"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","x-jedger.com:filter":false,"$ref":"#/components/schemas/iam.Uuid"},"description":"The id of the first row of the page held: the page above it, the newer rows, newest first. Stripe's word.","required":false},{"in":"query","name":"organization_id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"required":false},{"in":"query","name":"metadata","schema":{"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","type":"object","properties":{"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"additionalProperties":false},"description":"Stripe's metadata form: `metadata[object_id]=<id>`, every event of one row, a deleted one's too. One `@>` on the GIN index.","required":false,"style":"deepObject","explode":true},{"in":"query","name":"event_at[gte]","schema":{"$ref":"#/components/schemas/iam.DateTime"},"required":false},{"in":"query","name":"event_at[lt]","schema":{"$ref":"#/components/schemas/iam.DateTime"},"required":false}],"responses":{"200":{"description":"A bare array of events.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/iam.Event"}}}}},"400":{"description":"A query parameter refused, how each is named below. Also an unknown key. A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/events/{id}":{"get":{"tags":["iam.events"],"summary":"Retrieve one event.","description":"The row as your memberships may read it. An event is never written, changed or deleted through a door (any other method is 405).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"required":true},{"in":"query","name":"organization_id","schema":{"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","$ref":"#/components/schemas/iam.Uuid"},"description":"The organization the row belongs to, which jedgerd's socket routes a program's call by; a row of another organization answers 404, as a row that does not exist.","required":false}],"responses":{"200":{"description":"The event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.Event"}}}},"400":{"description":"A query is read by its schema above and no other key: a parameter it does not document is `parameter_unknown` (https://docs.stripe.com/error-codes#parameter-unknown), and one off its schema is `parameter_missing` (https://docs.stripe.com/error-codes#parameter-missing), `parameter_invalid_integer` (https://docs.stripe.com/error-codes#parameter-invalid-integer), `parameter_invalid_string_empty` (https://docs.stripe.com/error-codes#parameter-invalid-string-empty), `parameters_exclusive` (https://docs.stripe.com/error-codes#parameters-exclusive), `invalid_request` (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1), `param` naming it as it rides in the URL and the message stating what the request accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"No row has this `{id}`, the `{id}` is no UUID, or your policy hides the row: `resource_missing`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/google":{"post":{"tags":["iam.cards"],"summary":"Start filling a card from your Google Contacts, or importing one label of them as cards.","description":"A page's form POST, as a person: with `card_id`, answers 302 to Google's consent for `contacts.readonly`, added to what you already granted, and nothing is kept. With `organization_id` and the form field `contact_group`, the exact name of one Google label and no other field, in `application/x-www-form-urlencoded` or `multipart/form-data`: a person who may not insert into `iam.memberships` and `iam.cards` of that organization, one holding only `anon` there among them, is answered 302 to the page with `error` `forbidden`, no Google consent, and an `AccessDenied` event. Anyone else is answered 302 to Google for `openid` and `contacts.readonly` with `access_type=offline`, and the callback writes each of that label's contacts as an empty membership and the card about it, skipping what the organization holds or has deleted, keeps the refresh token sealed in `identity.refresh_tokens`, and the hourly run adds that label's new contacts from then on (this document's description, \"Not for agents\"). A 302 to Google sets the `__Host-iam_oauth_state` and `__Host-iam_oauth_verifier` cookies for ten minutes, and Google lands the browser on `GET /iam/v1/google/callback`. Any other method is 405 `method_not_allowed` with `Allow: POST`.","parameters":[{"in":"query","name":"card_id","schema":{"description":"The card to fill, an `iam.cards` id; exactly one of this and `organization_id`.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"description":"The card to fill, an `iam.cards` id; exactly one of this and `organization_id`.","required":false},{"in":"query","name":"organization_id","schema":{"description":"The organization the import writes its cards into, an `iam.organizations` id; the label is the form field `contact_group`.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"},"description":"The organization the import writes its cards into, an `iam.organizations` id; the label is the form field `contact_group`.","required":false},{"in":"query","name":"redirect_uri","schema":{"type":"string","description":"The full URL to come back to, admitted by the hostname's `REDIRECT_URI`."},"required":true,"description":"The full URL to come back to, admitted by the hostname's `REDIRECT_URI`."}],"responses":{"302":{"description":"302 to Google's consent, or to the page with `error` for an import refused.","headers":{"Location":{"description":"Google's authorization endpoint; for an import, the page with `error` `forbidden` or `provider_unsupported` instead.","schema":{"type":"string"}},"Set-Cookie":{"description":"`__Host-iam_oauth_state` and `__Host-iam_oauth_verifier`, ten minutes, on a 302 to Google alone.","schema":{"type":"string"}}}},"400":{"description":"Neither or both of `card_id` and `organization_id`, one that is no UUID, an import with no `contact_group` or with another form field (`param` `contact_group`), no `redirect_uri`, or one the hostname's `REDIRECT_URI` does not admit: `invalid_request`, `param` the key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"An agent's session or a device: Google Contacts are a person's, `forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"404":{"description":"A card's fill on a hostname with no Google client: `provider_unsupported`. An import answers it, and `forbidden`, as a 302 to the page with `error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"405":{"description":"Any method but POST: `method_not_allowed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}},"/iam/v1/google/callback":{"get":{"tags":["iam.cards"],"summary":"Google's redirect target; never called by hand.","description":"Google lands the browser here with `code` and `state`. The door checks `state` against the `__Host-iam_oauth_state` cookie and spends `code` for a token. For an import it then runs the document's import passage, ending in a 302 with `created` and `skipped` or `error`. For a fill it reads the card as your policy may update it, finds the Google contact whose name is the card's `name.full` exactly, whitespace collapsed, and adds the phones and emails the card lacks. Every outcome but the two refusals below is a 302 back to the page the start carried, both cookies cleared: with no `error` parameter, or with `error` set to `access_denied` (consent refused, or `contacts.readonly` not granted), `invalid_request` (the card has no `name.full`), `resource_missing` (no card you may update, or no contact of that name), `conflict` (the card changed meanwhile) or `server_error`; an import's `forbidden` and `resource_missing` are the document's import passage. Only a fault this side does not turn into a page is otherwise: the database unreached on either arm, or a statement of a fill throwing, is this operation's `default` answer, the cookies left to their ten minutes. Google's other parameters on this URL, `scope` among them, are read and not used.","parameters":[{"in":"query","name":"code","schema":{"description":"Google's authorization code.","type":"string"},"description":"Google's authorization code.","required":false},{"in":"query","name":"state","schema":{"description":"The `state` the start door minted.","type":"string"},"description":"The `state` the start door minted.","required":false},{"in":"query","name":"error","schema":{"description":"Present when the person declined.","type":"string"},"description":"Present when the person declined.","required":false}],"responses":{"302":{"description":"302 back to the page the start carried.","headers":{"Location":{"description":"The page the start carried, with `error` on a failure, and an import's `created` and `skipped` counts.","schema":{"type":"string"}},"Set-Cookie":{"description":"Both cookies cleared.","schema":{"type":"string"}}}},"400":{"description":"The `__Host-iam_oauth_state` or `__Host-iam_oauth_verifier` cookie is missing, the first is unequal to `state`, or the state carries no act or no page: `state_invalid`, the cookies cleared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"401":{"description":"No credential, or one expired, forged or past its ceiling: `invalid_token` (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1). Authenticate, or authenticate again, and resend.","headers":{"WWW-Authenticate":{"description":"A bare `Bearer` when the request carried no credential (no `Authorization: Bearer` and no `user_jwt` cookie), since RFC 6750 section 3.1 asks for no error code then; `Bearer error=\"invalid_token\"` when it carried one that was expired, forged or past its ceiling.","schema":{"type":"string","enum":["Bearer","Bearer error=\"invalid_token\""]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"403":{"description":"An agent's session or a device: `forbidden`, the cookies cleared.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"405":{"description":"Any method but `GET` and `HEAD`: `method_not_allowed`, `Allow: GET, HEAD`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}},"default":{"description":"Any status not listed: a fault on this side (500 `server_error`, its `message` naming nothing internal and its `request_id` the Ray ID the whole text is logged under), of a service this door calls (502 `bad_gateway`, another jedger door's refusal; 503 `service_unavailable`, the database unreached), or, on a `GET` or `HEAD` through the hub, 504 `gateway_timeout` when the answer's headers take longer than 5 s, all in the same envelope; nothing the request asked for was written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/iam.ApiErrorBody"}}}}}}}},"components":{"schemas":{"identity.ApiErrorBody":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code"],"properties":{"type":{"enum":["invalid_request_error","authentication_error","permission_error","api_error","upstream_error"],"description":"Whose problem it is, from the status."},"code":{"type":"string","description":"What a caller matches on, the standard's word where one exists.","anyOf":[{"const":"parameter_unknown","description":"A parameter this request does not take. `param` names it; the message lists every parameter the request takes, with its bounds and default. https://docs.stripe.com/error-codes#parameter-unknown"},{"const":"parameter_missing","description":"A required parameter is absent. `param` names it. https://docs.stripe.com/error-codes#parameter-missing"},{"const":"parameter_invalid_integer","description":"A whole number was expected. `param` names the parameter. https://docs.stripe.com/error-codes#parameter-invalid-integer"},{"const":"parameter_invalid_string_empty","description":"A parameter was sent as the empty string, `?limit=`. `param` names it; the message states what it accepts. https://docs.stripe.com/error-codes#parameter-invalid-string-empty"},{"const":"parameters_exclusive","description":"Two parameters that exclude each other were both sent, `starting_after` and `ending_before`: `param` `ending_before`, the message saying which to send. https://docs.stripe.com/error-codes#parameters-exclusive"},{"const":"invalid_request","description":"OAuth's (RFC 6749 section 5.2, https://datatracker.ietf.org/doc/html/rfc6749#section-5.2): a query or body off its schema, or `?id=` past 100 ids or not UUIDs. `param` names the parameter when one is refused; `message` says what is accepted."},{"const":"payload_too_large","description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14)."},{"const":"invalid_token","description":"RFC 6750 section 3.1's (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1): no credential, or a JWT expired, forged or past its ceiling; on a service-token sign-in, a secret and id that open no session, one answer for both."},{"const":"user_required","description":"jedger's: the users tree is reached by a person's session alone, and this credential names no person."},{"const":"forbidden","description":"jedger's: an agent's session where a person's is needed, a `user_id` your session does not reach, a service token asked for a person, or a sign-in started from another site."},{"const":"resource_missing","description":"Stripe's (https://docs.stripe.com/error-codes#resource-missing): no row of your tree has this `{id}`, or the `{id}` is no UUID; a row you do not reach is answered the same as an absent one. On the two `/.well-known` documents: this hostname is no OpenID Provider. Also a path this Worker does not serve, any method."},{"const":"method_not_allowed","description":"RFC 9110 section 15.5.6's (https://www.rfc-editor.org/rfc/rfc9110#section-15.5.6): the path does not answer this method; `Allow` lists the methods it does."},{"const":"restrict_violation","description":"Postgres's condition (SQLSTATE 23001): rows still point at this row, a person's own users row while memberships point at it among them."},{"const":"foreign_key_violation","description":"Postgres's condition (SQLSTATE 23503): the row names a row that does not exist."},{"const":"unique_violation","description":"Postgres's condition (SQLSTATE 23505): a row with this unique value already exists."},{"const":"check_violation","description":"Postgres's condition (SQLSTATE 23514): a value the table's check constraint refuses."},{"const":"data_too_large","description":"jedger's, answered 413 (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14): `data` would pass 2,048 bytes, the most the session cookie carries."},{"const":"server_error","description":"OAuth's (RFC 6749 section 4.1.2.1): a fault on this side; the message names the error's class and SQLSTATE alone, and `request_id` the Ray ID its whole text is logged under."},{"const":"bad_gateway","description":"RFC 9110 section 15.6.3's: a jedger door this one called, iam's, answered a refusal, or Google refused to revoke a refresh token or could not be reached; the message carries that status and code."},{"const":"conflict","description":"RFC 9110 section 15.5.10's (https://www.rfc-editor.org/rfc/rfc9110#section-15.5.10): the request conflicts with the state of the row, a refresh token issued to another hostname's Google client being revoked here, or sealed under a key this hostname no longer holds."},{"const":"service_unavailable","description":"RFC 9110 section 15.6.4's: the database could not be reached; retry."},{"const":"gateway_timeout","description":"RFC 9110 section 15.6.5's, the hub's on a `GET` or `HEAD`: the answer's headers took longer than 5 s."},{"const":"passkey_challenge_missing","description":"jedger's: no WebAuthn ceremony is in flight, the `webauthn_challenge` cookie absent, not signed by this hostname, altered or past its `exp`, or, signed out, a challenge no sign-up was minted with."},{"const":"passkey_verification_failed","description":"jedger's: the attestation or assertion did not verify against the challenge, the origin, the RP ID or the stored key."},{"const":"passkey_credential_unknown","description":"jedger's: the credential id of an assertion names no passkey here."},{"const":"invalid_client","description":"OAuth's (RFC 6749 section 5.2): `client_id` is neither jedger's CLI's, `jedger-cli` (400), nor a registered relying party whose `client_secret_basic` authenticates (401, with `WWW-Authenticate: Basic`)."},{"const":"invalid_grant","description":"OAuth's (RFC 6749 section 5.2): the code is unknown, spent, expired, does not match the request, or names no user; or `code_verifier` is malformed."},{"const":"unsupported_grant_type","description":"OAuth's (RFC 6749 section 5.2): `grant_type` is none this endpoint grants, or the webauthn grant on a hostname whose `SUPPORTED_IDENTITY_PROVIDERS` lists no `passkey`."},{"const":"authorization_pending","description":"RFC 8628 section 3.5's: the person has not answered the device request yet; poll again after `interval` seconds."},{"const":"expired_token","description":"RFC 8628 section 3.5's: the `device_code` has expired; start a new request."},{"const":"access_denied","description":"RFC 8628 section 3.5's: the person denied the device request."},{"const":"provider_unsupported","description":"jedger's: `{provider}` names no provider the hostname's `SUPPORTED_IDENTITY_PROVIDERS` lists; or, revoking a refresh token, this hostname holds no key for a Google grant."},{"const":"passkey_unsupported","description":"jedger's: the hostname's `SUPPORTED_IDENTITY_PROVIDERS` lists no `passkey`, so it runs no passkey ceremony; the login card reads the same code when the browser has no WebAuthn."},{"const":"provider_denied","description":"jedger's: the provider sent the browser back with `error`, the person having declined at its consent screen."},{"const":"state_invalid","description":"jedger's: the callback's `state` is missing, does not equal the `__Host-oauth_state` cookie, or carries no destination; or Google's `__Host-oauth_verifier` cookie is missing."},{"const":"code_exchange_failed","description":"jedger's: the provider's token endpoint refused the authorization code, or, for `jedger`, its `id_token` did not verify (`iss`, `aud`, `exp`, `nonce`, the signature by its JWK Set)."},{"const":"provider_response_invalid","description":"jedger's: the provider's user information named no usable identity."},{"const":"email_unverified","description":"jedger's: Google reported `email_verified` false."},{"type":"string","description":"A vendor's own code a door passes through on a refusal it relays."}]},"message":{"type":"string","description":"What was wrong and what is accepted, for a person or an agent to read. On a 500 it names nothing internal: for a thrown error its class and, when Postgres raised it, its SQLSTATE; for a 500 a door answered itself, only that its text is logged. The whole text is in the Worker's log under `request_id`."},"param":{"type":"string","description":"The parameter that was refused, its path in the request: `data.schema.org:name`, `0.object_id`, `id`."},"request_id":{"type":"string","description":"On a 500 alone: the request's Ray ID, its `CF-Ray` header (https://developers.cloudflare.com/fundamentals/reference/http-headers/#cf-ray), which the Worker's log holds the fault's whole text under. Absent when the request did not come through Cloudflare."}}}}},"identity.Uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"identity.DateTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"identity.AttachmentsTableState":{"type":"object","properties":{"columnVisibility":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"boolean"}},"columnOrder":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"sorting":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"desc":{"type":"boolean"}},"required":["id","desc"],"additionalProperties":false}},"github.com:layout":{"type":"string","enum":["table","material.io:feed"],"externalDocs":{"url":"https://docs.github.com/en/graphql/reference/projects"}}},"additionalProperties":false},"identity.AuthorizationGrantData":{"type":"object","properties":{"approved":{"type":"boolean"}},"required":["approved"],"additionalProperties":false},"identity.AuthorizationGrantPatch":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/identity.AuthorizationGrantData"},"user_code":{"$ref":"#/components/schemas/identity.UserCode"}},"required":["data"],"additionalProperties":false},"identity.Conversation":{"type":"object","properties":{"schema.org:duration":{"$ref":"#/components/schemas/identity.Duration","externalDocs":{"url":"https://schema.org/duration"}},"color_self":{"type":"string","pattern":"^#(?:[0-9A-Fa-f]{3,4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"},"color_front_office":{"type":"string","pattern":"^#(?:[0-9A-Fa-f]{3,4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"},"color_back_office":{"type":"string","pattern":"^#(?:[0-9A-Fa-f]{3,4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"},"reasoning":{"type":"boolean"},"front_office":{"type":"boolean"},"silent":{"type":"boolean"},"threads":{"$ref":"#/components/schemas/identity.ThreadsTableState"},"messages":{"$ref":"#/components/schemas/identity.TableState"},"attachments":{"$ref":"#/components/schemas/identity.TableState"},"events":{"$ref":"#/components/schemas/identity.TableState"},"actions":{"$ref":"#/components/schemas/identity.TableState"},"aws.amazon.com:notificationConfigurations":{"$ref":"#/components/schemas/identity.NotificationConfigurations"},"calendar_events":{"$ref":"#/components/schemas/identity.TableState"},"calendars":{"$ref":"#/components/schemas/identity.TableState"}},"additionalProperties":false},"identity.Design":{"type":"object","properties":{"copy":{"type":"boolean"},"edit":{"type":"boolean"},"pages":{"$ref":"#/components/schemas/identity.TableState"},"attachments":{"$ref":"#/components/schemas/identity.AttachmentsTableState"},"redirects":{"$ref":"#/components/schemas/identity.TableState"},"events":{"$ref":"#/components/schemas/identity.TableState"}},"additionalProperties":false},"identity.Duration":{"type":"string","pattern":"^P(?:(?:\\d+D|\\d+M(?:\\d+D)?|\\d+Y(?:\\d+M(?:\\d+D)?)?)(?:T(?:\\d+H(?:\\d+M(?:\\d+S)?)?|\\d+M(?:\\d+S)?|\\d+S))?|T(?:\\d+H(?:\\d+M(?:\\d+S)?)?|\\d+M(?:\\d+S)?|\\d+S)|\\d+W)$"},"identity.Event":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"type":{"type":"string"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"event_at":{"$ref":"#/components/schemas/identity.DateTime"},"created_at":{"$ref":"#/components/schemas/identity.DateTime"},"metadata":{"type":"object","properties":{"api_version":{"type":"string"},"sub":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"act":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source_ip_address":{"type":"string"},"user_agent":{"type":"string"},"request_id":{"type":"string"},"access_key_id":{"type":"string"}},"required":["api_version"],"additionalProperties":{}},"authorization_grant_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]},"oauth_account_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]},"passkey_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]},"service_token_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]},"user_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]},"push_subscription_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]},"refresh_token_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]}},"required":["id","type","data","event_at","created_at","metadata","authorization_grant_id","oauth_account_id","passkey_id","service_token_id","user_id","push_subscription_id","refresh_token_id"],"additionalProperties":false},"identity.EventPattern":{"type":"object","properties":{"metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"minItems":1,"maxItems":2,"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"},{"type":"null"}]}}}},"required":["metadata"],"additionalProperties":false},"identity.EventRule":{"type":"object","properties":{"eventType":{"type":"string","enum":["thread.created","message.created","message.updated","action.created"]},"eventPattern":{"$ref":"#/components/schemas/identity.EventPattern"}},"required":["eventType"],"additionalProperties":false},"identity.NotificationConfiguration":{"type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/identity.Uuid"},"channels":{"maxItems":3,"type":"array","items":{"type":"string","enum":["email","slack","push"]}},"eventRules":{"maxItems":4,"type":"array","items":{"$ref":"#/components/schemas/identity.EventRule"}}},"required":["organization_id","channels","eventRules"],"additionalProperties":false},"identity.NotificationConfigurations":{"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/identity.NotificationConfiguration"}},"identity.OauthAccountPatch":{"type":"object","properties":{},"additionalProperties":false},"identity.PasskeyCreateRequest":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"},"rawId":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"},"type":{"type":"string","const":"public-key"},"response":{"type":"object","properties":{"clientDataJSON":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"},"attestationObject":{"type":"string","minLength":1,"maxLength":16384,"pattern":"^[A-Za-z0-9_-]+$"},"authenticatorData":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"},"publicKey":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"},"publicKeyAlgorithm":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["clientDataJSON","attestationObject"]},"authenticatorAttachment":{"anyOf":[{"type":"string","enum":["platform","cross-platform"]},{"type":"null"}]},"clientExtensionResults":{"type":"object","properties":{"credProps":{"type":"object","properties":{"rk":{"type":"boolean"}}}}}},"required":["id","rawId","type","response","clientExtensionResults"]},"identity.PasskeyData":{"type":"object","properties":{"schema.org:name":{"type":"string","minLength":1,"externalDocs":{"url":"https://schema.org/name"}}},"additionalProperties":false},"identity.PasskeyDataPatch":{"type":"object","properties":{"schema.org:name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"externalDocs":{"url":"https://schema.org/name"}}},"additionalProperties":false},"identity.PasskeyPatch":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/identity.PasskeyDataPatch"}},"required":["data"],"additionalProperties":false},"identity.PushSubscriptionCreateRequest":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048},"expirationTime":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"keys":{"type":"object","properties":{"p256dh":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"},"auth":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["p256dh","auth"]},"application_server_key":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["endpoint","keys","application_server_key"],"additionalProperties":false},"identity.PushSubscriptionData":{"type":"object","properties":{"schema.org:name":{"type":"string","minLength":1,"maxLength":200,"externalDocs":{"url":"https://schema.org/name"}}},"additionalProperties":false},"identity.PushSubscriptionDataPatch":{"type":"object","properties":{"schema.org:name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"externalDocs":{"url":"https://schema.org/name"}}},"additionalProperties":false},"identity.PushSubscriptionPatch":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/identity.PushSubscriptionDataPatch"}},"required":["data"],"additionalProperties":false},"identity.RefreshTokenData":{"type":"object","properties":{"ietf.org:scope":{"type":"string","minLength":1,"externalDocs":{"url":"https://www.rfc-editor.org/rfc/rfc6749#section-3.3"}},"google.com:contactGroupResourceName":{"type":"string","minLength":1},"google.com:syncToken":{"type":"string","minLength":1},"jedger.com:organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"jedger's own key (jedger.com): the refresh_tokens comment says what it is."},"google.com:calendar":{"type":"object","properties":{"calendarId":{"type":"string","minLength":1},"syncToken":{"type":"string","minLength":1},"jedger.com:organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"jedger's own key (jedger.com): the refresh_tokens comment says what it is."}},"required":["calendarId","jedger.com:organization_id"],"additionalProperties":false}},"required":["ietf.org:scope"],"additionalProperties":false},"identity.ServiceTokenCreateRequest":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["user_id"],"additionalProperties":false},"identity.ServiceTokenPatch":{"type":"object","properties":{},"additionalProperties":false},"identity.TableState":{"type":"object","properties":{"columnVisibility":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"boolean"}},"columnOrder":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"sorting":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"desc":{"type":"boolean"}},"required":["id","desc"],"additionalProperties":false}}},"additionalProperties":false},"identity.Tables":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/identity.TableState"}},"identity.ThreadsTableState":{"type":"object","properties":{"columnVisibility":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"boolean"}},"columnOrder":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},"sorting":{"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"desc":{"type":"boolean"}},"required":["id","desc"],"additionalProperties":false}},"github.com:layout":{"type":"string","enum":["table","material.io:list-detail"],"externalDocs":{"url":"https://docs.github.com/en/graphql/reference/projects"}}},"additionalProperties":false},"identity.UserCode":{"type":"string","maxLength":64},"identity.UserCreateRequest":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/identity.UserData"}},"additionalProperties":false},"identity.UserData":{"type":"object","properties":{"conversation":{"description":"The person's options for the conversation site, one object: schema.org:duration, color_self, color_front_office, color_back_office, reasoning, front_office, silent; each absent is its default, silent's being true, no alert sound; one key per table, threads, messages, attachments, events, actions, calendars, calendar_events, each the part of TanStack Table's own state the person set, threads also github.com:layout, table (the default) or material.io:list-detail; and aws.amazon.com:notificationConfigurations, AWS User Notifications' tiny subset, one entry per organization_id, its channels (email, slack, push) and its eventRules, each an eventType of conversation.events and an optional eventPattern over the written row's metadata; an organization with no entry notifies nobody. A PATCH replaces the whole object; null removes it.","$ref":"#/components/schemas/identity.Conversation"},"openid.net:locale":{"description":"The language the person reads in, a BCP 47 tag, OpenID Connect's locale claim. A page's language is the URL's segment, then this, then Accept-Language, then English.","type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$","externalDocs":{"url":"https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims"}},"csswg.org:prefers-color-scheme":{"description":"light or dark, the person's own colour scheme, the CSS media feature's word (prefers-color-scheme). Absent, the browser's own preference decides.","type":"string","enum":["light","dark"],"externalDocs":{"url":"https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme"}},"limit":{"description":"How many rows a list page shows, 1 to 100, Stripe's limit, the word every list door takes too. Absent, 50.","type":"integer","minimum":1,"maximum":100},"design":{"description":"The person's options for the design site, one object: copy and edit, whether a design page's menu offers each, absent is on; and one key per table, pages, attachments, redirects, events, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting; attachments also github.com:layout, table (the default) or material.io:feed, the files drawn as a grid to play and see. A PATCH replaces the whole object; null removes it.","$ref":"#/components/schemas/identity.Design"},"ietf.org:card":{"description":"The user's own JSContact Card (RFC 9553), whole, in the RFC's bare keys: the user's name at name.full is the name every site shows for this user. The first sign-in writes the provider's display name there; a PATCH replaces the whole card; null removes it.","type":"object","properties":{"kind":{"type":"string","enum":["individual","group","org","location","device","application"]},"language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"name":{"type":"object","properties":{"@type":{"type":"string","const":"Name"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"NameComponent"},"kind":{"type":"string","enum":["title","given","given2","surname","surname2","credential","generation","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"defaultSeparator":{"type":"string"},"full":{"type":"string"},"sortAs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"phoneticSystem":{"type":"string"},"phoneticScript":{"type":"string"}},"additionalProperties":false},"nicknames":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Nickname"},"name":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100}},"required":["name"],"additionalProperties":false}},"localizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"titles":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Title"},"name":{"type":"string"},"kind":{"type":"string","enum":["title","role"]},"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"}},"required":["name"],"additionalProperties":false}},"emails":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"EmailAddress"},"address":{"type":"string","pattern":"^[^\\s@:]+@[^\\s@]+$"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["address"],"additionalProperties":false}},"phones":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Phone"},"number":{"type":"string","pattern":"^tel:\\+\\d+$"},"features":{"type":"object","propertyNames":{"type":"string","enum":["mobile","voice","text","video","main-number","textphone","fax","pager"]},"additionalProperties":{"type":"boolean","const":true}},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["number"],"additionalProperties":false}},"links":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Link"},"kind":{"type":"string","const":"contact"},"uri":{"type":"string","format":"uri"},"mediaType":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["uri"],"additionalProperties":false}},"addresses":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"anniversaries":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Anniversary"},"kind":{"type":"string","enum":["birth","death","wedding"]},"date":{"anyOf":[{"type":"object","properties":{"@type":{"type":"string","const":"PartialDate"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"month":{"type":"integer","minimum":1,"maximum":12},"day":{"type":"integer","minimum":1,"maximum":31},"calendarScale":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Timestamp"},"utc":{"type":"string"}},"required":["utc"],"additionalProperties":false}]},"place":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"required":["date"],"additionalProperties":false}},"notes":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Note"},"note":{"type":"string"},"created":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["note"],"additionalProperties":false}},"media":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Media"},"kind":{"type":"string","enum":["photo","sound","logo"]},"uri":{"type":"string","maxLength":32768,"pattern":"^data:image\\/svg\\+xml;base64,[A-Za-z0-9+/]+={0,2}$"},"mediaType":{"type":"string","const":"image/svg+xml"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["kind","uri"],"additionalProperties":false}},"w3.org:identifier":{"type":"object","propertyNames":{"type":"string","pattern":"^(\\d{4}|[A-Z]{2}:[A-Za-z0-9]+)$"},"additionalProperties":{"type":"string","pattern":"^\\d+$"}},"uid":{"type":"string","minLength":1,"maxLength":255},"organizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Organization"},"name":{"type":"string"},"units":{"minItems":1,"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"OrgUnit"},"name":{"type":"string"},"sortAs":{"type":"string"}},"required":["name"],"additionalProperties":false}},"sortAs":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}}},"additionalProperties":false}},"onlineServices":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"OnlineService"},"service":{"type":"string"},"uri":{"type":"string","format":"uri"},"user":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false,"externalDocs":{"url":"https://www.rfc-editor.org/rfc/rfc9553#section-2"}},"iam":{"description":"The person's table settings for the iam site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","$ref":"#/components/schemas/identity.Tables"},"identity":{"description":"The person's table settings for the identity site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","$ref":"#/components/schemas/identity.Tables"},"machine":{"description":"The person's table settings for the machine site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","$ref":"#/components/schemas/identity.Tables"},"artifact":{"description":"The person's table settings for the artifact site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","$ref":"#/components/schemas/identity.Tables"},"finance":{"description":"The person's table settings for the finance site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","$ref":"#/components/schemas/identity.Tables"},"game":{"description":"The person's table settings for the game site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","$ref":"#/components/schemas/identity.Tables"}},"additionalProperties":false,"patternProperties":{"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$":{"description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused."}}},"identity.UserDataPatch":{"type":"object","properties":{"conversation":{"description":"The person's options for the conversation site, one object: schema.org:duration, color_self, color_front_office, color_back_office, reasoning, front_office, silent; each absent is its default, silent's being true, no alert sound; one key per table, threads, messages, attachments, events, actions, calendars, calendar_events, each the part of TanStack Table's own state the person set, threads also github.com:layout, table (the default) or material.io:list-detail; and aws.amazon.com:notificationConfigurations, AWS User Notifications' tiny subset, one entry per organization_id, its channels (email, slack, push) and its eventRules, each an eventType of conversation.events and an optional eventPattern over the written row's metadata; an organization with no entry notifies nobody. A PATCH replaces the whole object; null removes it.","anyOf":[{"$ref":"#/components/schemas/identity.Conversation"},{"type":"null"}]},"openid.net:locale":{"description":"The language the person reads in, a BCP 47 tag, OpenID Connect's locale claim. A page's language is the URL's segment, then this, then Accept-Language, then English.","anyOf":[{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},{"type":"null"}],"externalDocs":{"url":"https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims"}},"csswg.org:prefers-color-scheme":{"description":"light or dark, the person's own colour scheme, the CSS media feature's word (prefers-color-scheme). Absent, the browser's own preference decides.","anyOf":[{"type":"string","enum":["light","dark"]},{"type":"null"}],"externalDocs":{"url":"https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme"}},"limit":{"description":"How many rows a list page shows, 1 to 100, Stripe's limit, the word every list door takes too. Absent, 50.","anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"design":{"description":"The person's options for the design site, one object: copy and edit, whether a design page's menu offers each, absent is on; and one key per table, pages, attachments, redirects, events, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting; attachments also github.com:layout, table (the default) or material.io:feed, the files drawn as a grid to play and see. A PATCH replaces the whole object; null removes it.","anyOf":[{"$ref":"#/components/schemas/identity.Design"},{"type":"null"}]},"ietf.org:card":{"description":"The user's own JSContact Card (RFC 9553), whole, in the RFC's bare keys: the user's name at name.full is the name every site shows for this user. The first sign-in writes the provider's display name there; a PATCH replaces the whole card; null removes it.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["individual","group","org","location","device","application"]},"language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"name":{"type":"object","properties":{"@type":{"type":"string","const":"Name"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"NameComponent"},"kind":{"type":"string","enum":["title","given","given2","surname","surname2","credential","generation","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"defaultSeparator":{"type":"string"},"full":{"type":"string"},"sortAs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"phoneticSystem":{"type":"string"},"phoneticScript":{"type":"string"}},"additionalProperties":false},"nicknames":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Nickname"},"name":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100}},"required":["name"],"additionalProperties":false}},"localizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"titles":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Title"},"name":{"type":"string"},"kind":{"type":"string","enum":["title","role"]},"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"}},"required":["name"],"additionalProperties":false}},"emails":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"EmailAddress"},"address":{"type":"string","pattern":"^[^\\s@:]+@[^\\s@]+$"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["address"],"additionalProperties":false}},"phones":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Phone"},"number":{"type":"string","pattern":"^tel:\\+\\d+$"},"features":{"type":"object","propertyNames":{"type":"string","enum":["mobile","voice","text","video","main-number","textphone","fax","pager"]},"additionalProperties":{"type":"boolean","const":true}},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["number"],"additionalProperties":false}},"links":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Link"},"kind":{"type":"string","const":"contact"},"uri":{"type":"string","format":"uri"},"mediaType":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["uri"],"additionalProperties":false}},"addresses":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"anniversaries":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Anniversary"},"kind":{"type":"string","enum":["birth","death","wedding"]},"date":{"anyOf":[{"type":"object","properties":{"@type":{"type":"string","const":"PartialDate"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"month":{"type":"integer","minimum":1,"maximum":12},"day":{"type":"integer","minimum":1,"maximum":31},"calendarScale":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Timestamp"},"utc":{"type":"string"}},"required":["utc"],"additionalProperties":false}]},"place":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"required":["date"],"additionalProperties":false}},"notes":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Note"},"note":{"type":"string"},"created":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["note"],"additionalProperties":false}},"media":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Media"},"kind":{"type":"string","enum":["photo","sound","logo"]},"uri":{"type":"string","maxLength":32768,"pattern":"^data:image\\/svg\\+xml;base64,[A-Za-z0-9+/]+={0,2}$"},"mediaType":{"type":"string","const":"image/svg+xml"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["kind","uri"],"additionalProperties":false}},"w3.org:identifier":{"type":"object","propertyNames":{"type":"string","pattern":"^(\\d{4}|[A-Z]{2}:[A-Za-z0-9]+)$"},"additionalProperties":{"type":"string","pattern":"^\\d+$"}},"uid":{"type":"string","minLength":1,"maxLength":255},"organizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Organization"},"name":{"type":"string"},"units":{"minItems":1,"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"OrgUnit"},"name":{"type":"string"},"sortAs":{"type":"string"}},"required":["name"],"additionalProperties":false}},"sortAs":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}}},"additionalProperties":false}},"onlineServices":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"OnlineService"},"service":{"type":"string"},"uri":{"type":"string","format":"uri"},"user":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false},{"type":"null"}],"externalDocs":{"url":"https://www.rfc-editor.org/rfc/rfc9553#section-2"}},"iam":{"description":"The person's table settings for the iam site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","anyOf":[{"$ref":"#/components/schemas/identity.Tables"},{"type":"null"}]},"identity":{"description":"The person's table settings for the identity site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","anyOf":[{"$ref":"#/components/schemas/identity.Tables"},{"type":"null"}]},"machine":{"description":"The person's table settings for the machine site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","anyOf":[{"$ref":"#/components/schemas/identity.Tables"},{"type":"null"}]},"artifact":{"description":"The person's table settings for the artifact site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","anyOf":[{"$ref":"#/components/schemas/identity.Tables"},{"type":"null"}]},"finance":{"description":"The person's table settings for the finance site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","anyOf":[{"$ref":"#/components/schemas/identity.Tables"},{"type":"null"}]},"game":{"description":"The person's table settings for the game site, one key per table, the table's name, each the part of TanStack Table's own state the person set: columnVisibility, columnOrder, sorting. A PATCH replaces the whole object; null removes it.","anyOf":[{"$ref":"#/components/schemas/identity.Tables"},{"type":"null"}]}},"additionalProperties":false,"patternProperties":{"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$":{"description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused."}}},"identity.UserPatch":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/identity.UserDataPatch"}},"additionalProperties":false,"examples":[{"data":{"limit":20,"csswg.org:prefers-color-scheme":"dark","example.com:homeTab":"calendar"}},{"data":{"csswg.org:prefers-color-scheme":null}}]},"identity.AuthorizationGrantWithoutCodeHash":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]},"data":{"type":"object","properties":{"approved":{"type":"boolean"}},"additionalProperties":false},"user_code":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","user_id","data","user_code","metadata"],"additionalProperties":false},"identity.OauthAccount":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"$ref":"#/components/schemas/identity.Uuid"},"iss":{"type":"string"},"sub":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","user_id","iss","sub","metadata"],"additionalProperties":false},"identity.Passkey":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"$ref":"#/components/schemas/identity.Uuid"},"credential_id":{"type":"string"},"public_key":{"type":"string"},"sign_count":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"$ref":"#/components/schemas/identity.PasskeyData"}},"required":["id","user_id","credential_id","public_key","sign_count","metadata","data"],"additionalProperties":false},"identity.PushSubscription":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"$ref":"#/components/schemas/identity.Uuid"},"application_server_key":{"type":"string"},"auth":{"type":"string"},"data":{"$ref":"#/components/schemas/identity.PushSubscriptionData"},"endpoint":{"type":"string"},"expiration_time":{"anyOf":[{"$ref":"#/components/schemas/identity.DateTime"},{"type":"null"}]},"p256dh":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","user_id","application_server_key","auth","data","endpoint","expiration_time","p256dh","metadata"],"additionalProperties":false},"identity.RefreshTokenWithoutJwe":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"$ref":"#/components/schemas/identity.Uuid"},"client_id":{"type":"string"},"data":{"$ref":"#/components/schemas/identity.RefreshTokenData"},"iss":{"type":"string"},"sub":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","user_id","client_id","data","iss","sub","metadata"],"additionalProperties":false},"identity.ServiceTokenWithoutTokenHash":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"$ref":"#/components/schemas/identity.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","user_id","metadata"],"additionalProperties":false},"identity.User":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"$ref":"#/components/schemas/identity.UserData"}},"required":["id","metadata","data"],"additionalProperties":false,"createOnlyProperties":[],"readOnlyProperties":["/properties/id","/properties/metadata"]},"identity.ServiceTokenCreated":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"$ref":"#/components/schemas/identity.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secret":{"type":"string"}},"required":["id","user_id","metadata","secret"],"additionalProperties":false},"identity.AuthorizationGrantUpdated":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"anyOf":[{"$ref":"#/components/schemas/identity.Uuid"},{"type":"null"}]},"data":{"type":"object","properties":{"approved":{"type":"boolean"}},"additionalProperties":false},"user_code":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"code":{"type":"string"}},"required":["id","user_id","data","user_code","metadata"],"additionalProperties":false},"identity.ExpandedPasskey":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"user_id":{"$ref":"#/components/schemas/identity.Uuid"},"credential_id":{"type":"string"},"public_key":{"type":"string"},"sign_count":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"$ref":"#/components/schemas/identity.PasskeyData"},"events":{"type":"array","items":{"$ref":"#/components/schemas/identity.Event"}}},"required":["id","user_id","credential_id","public_key","sign_count","metadata","data"],"additionalProperties":false},"identity.UserNotifications":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/identity.Uuid"},"data":{"$ref":"#/components/schemas/identity.UserData"}},"required":["id","data"],"additionalProperties":false},"conversation.ApiErrorBody":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code"],"properties":{"type":{"enum":["invalid_request_error","authentication_error","permission_error","api_error","upstream_error"],"description":"Whose problem it is, from the status."},"code":{"type":"string","description":"What a caller matches on, the standard's word where one exists.","anyOf":[{"const":"parameter_unknown","description":"A parameter this request does not take. `param` names it; the message lists every parameter the request takes, with its bounds and default. https://docs.stripe.com/error-codes#parameter-unknown"},{"const":"parameter_missing","description":"A required parameter is absent. `param` names it. https://docs.stripe.com/error-codes#parameter-missing"},{"const":"parameter_invalid_integer","description":"A whole number was expected. `param` names the parameter. https://docs.stripe.com/error-codes#parameter-invalid-integer"},{"const":"parameter_invalid_string_empty","description":"A parameter was sent as the empty string, `?limit=`. `param` names it; the message states what it accepts. https://docs.stripe.com/error-codes#parameter-invalid-string-empty"},{"const":"parameters_exclusive","description":"Two parameters that exclude each other were both sent, `starting_after` and `ending_before`: `param` `ending_before`, the message saying which to send. https://docs.stripe.com/error-codes#parameters-exclusive"},{"const":"invalid_request","description":"400, RFC 6750 section 3.1's word (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1): the body refused by the door's schema, or no JSON, `param` the first issue's path and `message` every issue; a query value off its schema; or a value the door checks itself, `param` naming it: an `id` dated more than 5 minutes ahead, a socket with no `thread_id` or no `conversation.messages`, a mint with no realtime model or with your `conversation.front_office` off, a part number or an `upload_id` R2 refused."},{"const":"payload_too_large","description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14)."},{"const":"attachments_too_many","description":"400: a message carries at most 5 attachments."},{"const":"invalid_token","description":"401: no credential, or one expired, forged or past its ceiling (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1)."},{"const":"user_required","description":"403: the credential names no person, a device's JWT; every door here judges a person's memberships, but for a device's live voice turn: `POST /threads` with no `message`, `POST /vercel` and a client-reported `POST /messages`."},{"const":"state_invalid","description":"400: `GET /google/callback` alone: the `__Host-iam_oauth_state` or `__Host-iam_oauth_verifier` cookie is missing, the first is unequal to `state`, or the state carries no organization or no page."},{"const":"forbidden","description":"403: an agent's session or a device on the two Google doors, a calendar being a person's; or your memberships do not allow the row to be created, or a next call to be finished or the call its finish plans to be created (`PATCH /actions/{id}`), or a caller who holds no `back_office` post named a membership that is no office (`POST /threads`, `PATCH /threads/{id}`), or a socket's handshake came with an `Origin` this hostname does not admit (`GET /messages`)."},{"const":"resource_missing","description":"404: no row has this `{id}`, it is no UUID, or your policy does not admit the read or the write on it; or a path this Worker does not serve."},{"const":"method_not_allowed","description":"405: the path does not answer this method; `Allow` lists those it does."},{"const":"unique_violation","description":"409: Postgres's SQLSTATE 23505, an id or a key written twice; `message` names the constraint."},{"const":"foreign_key_violation","description":"409: Postgres's SQLSTATE 23503, a row another still points at, or a row naming one that does not exist; `message` names the constraint."},{"const":"restrict_violation","description":"409: Postgres's SQLSTATE 23001, a delete a RESTRICT foreign key refuses; `message` names the constraint."},{"const":"check_violation","description":"409: Postgres's SQLSTATE 23514, a row a CHECK constraint refuses; `message` names the constraint."},{"const":"conflict","description":"409: an action another membership holds, a finish by one that is not its agent or past PT10M of its claim, a next call already finished, or a planned call whose `identifier` an action already holds."},{"const":"attachment_too_large","description":"413: a file carries at most 268435456 bytes (256 MiB)."},{"const":"part_too_large","description":"413: a part of a multipart upload carries at most 10485760 bytes (10 MiB)."},{"const":"rate_limit","description":"429: a live session's mint about a minute after your last, or past your daily number; or, for a guest (the description), a message past `MESSAGES_PER_DAY`, or files past `ATTACHMENTS_PER_DAY`, since UTC midnight on this hostname. Stripe's word (https://docs.stripe.com/error-codes#rate-limit); `Retry-After` says when."},{"const":"server_error","description":"500: a fault on this side; `message` names the error's class and its SQLSTATE, `request_id` the Ray ID the whole text is logged under."},{"const":"bad_gateway","description":"502: the AI Gateway refused a mint or its model list could not be read."},{"const":"service_unavailable","description":"503: the thread's stream cannot be opened: the hostname holds no key to sign it, or the thread's holder answered no socket within 4 seconds; or the hostname states no daily number a counted write needs (`CLIENT_SECRETS_PER_DAY`, `MESSAGES_PER_DAY`, `ATTACHMENTS_PER_DAY`)."},{"const":"gateway_timeout","description":"504: through the hub, a `GET` or `HEAD` whose answer's headers took longer than 5 seconds, a socket's handshake among them; the hub's answer, not a door's (RFC 9110 section 15.6.5, https://www.rfc-editor.org/rfc/rfc9110#section-15.6.5)."},{"type":"string","description":"A vendor's own code a door passes through on a refusal it relays."}]},"message":{"type":"string","description":"What was wrong and what is accepted, for a person or an agent to read. On a 500 it names nothing internal: for a thrown error its class and, when Postgres raised it, its SQLSTATE; for a 500 a door answered itself, only that its text is logged. The whole text is in the Worker's log under `request_id`."},"param":{"type":"string","description":"The parameter that was refused, its path in the request: `data.schema.org:name`, `0.object_id`, `id`."},"request_id":{"type":"string","description":"On a 500 alone: the request's Ray ID, its `CF-Ray` header (https://developers.cloudflare.com/fundamentals/reference/http-headers/#cf-ray), which the Worker's log holds the fault's whole text under. Absent when the request did not come through Cloudflare."}}}}},"conversation.Uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"conversation.DateTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"conversation.MediaType":{"type":"string","maxLength":255,"pattern":"^[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}\\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}(?:[ \\t]*;[ \\t]*(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+=(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+|\"(?:[\\t \\x21\\x23-\\x5b\\x5d-\\x7e]|\\\\[\\t\\x20-\\x7e])*\"))?)*$","description":"The file's media type, `type/subtype` (RFC 6838 section 4.2) with optional parameters (RFC 9110 section 8.3.1)."},"conversation.Action":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"thread_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","organization_id","thread_id","data","metadata"],"additionalProperties":false,"createOnlyProperties":["/properties/id","/properties/organization_id","/properties/thread_id","/properties/data/recipient","/properties/data/event"],"readOnlyProperties":["/properties/metadata","/properties/data/agent","/properties/data/startTime","/properties/data/endTime","/properties/data/resultComment"]},"conversation.AttachmentAnswer":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"message_id":{"$ref":"#/components/schemas/conversation.Uuid"},"filename":{"type":["string","null"]},"media_type":{"type":"string"},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The file's octets; null until a multipart upload completes."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","message_id","filename","media_type","size","metadata"],"additionalProperties":false},"conversation.ListedMessages":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"thread_id":{"$ref":"#/components/schemas/conversation.Uuid"},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":200000}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file"},"url":{"type":"string","minLength":1,"maxLength":2000000,"pattern":"^(?:\\/conversation\\/v1\\/attachments\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|data:(?:text\\/vtt|application\\/json);base64,[A-Za-z0-9+/]*={0,2}$)"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"data-schema.org:Action"},"data":{"type":"object","properties":{"@type":{"type":"string","enum":["ConfirmAction","CancelAction"]},"name":{"type":"string","minLength":1,"maxLength":80},"actionStatus":{"type":"string","enum":["PotentialActionStatus","CompletedActionStatus","FailedActionStatus"]},"object":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":["@type","name","actionStatus"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"}},"role":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"membership_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]},"name":{"anyOf":[{"type":"object","properties":{"full":{"type":"string"}},"additionalProperties":{}},{"type":"null"}],"description":"The speaker's name on the organization's iam card about the message's membership, JSContact's Name object, `full` the name to show (RFC 9553 section 2.2.1, https://www.rfc-editor.org/rfc/rfc9553#section-2.2.1); null when none is read."},"attachments":{"description":"The rows of the files the message carried that your policy admits, in id order; absent when it carried none.","type":"array","items":{"$ref":"#/components/schemas/conversation.AttachmentAnswer"}}},"required":["id","thread_id","parts","role","metadata","membership_id","name"],"additionalProperties":false},"conversation.AttachmentCreated":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"message_id":{"$ref":"#/components/schemas/conversation.Uuid"},"filename":{"type":["string","null"]},"media_type":{"type":"string"},"size":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The file's octets; null until a multipart upload completes."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"upload_id":{"description":"With `multipart: true`: the R2 multipart upload opened under the row's id (https://developers.cloudflare.com/r2/objects/multipart-objects/).","type":"string"}},"required":["id","message_id","filename","media_type","size","metadata"],"additionalProperties":false},"conversation.MessageCreated":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"thread_id":{"$ref":"#/components/schemas/conversation.Uuid"},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":200000}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file"},"url":{"type":"string","minLength":1,"maxLength":2000000,"pattern":"^(?:\\/conversation\\/v1\\/attachments\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|data:(?:text\\/vtt|application\\/json);base64,[A-Za-z0-9+/]*={0,2}$)"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"data-schema.org:Action"},"data":{"type":"object","properties":{"@type":{"type":"string","enum":["ConfirmAction","CancelAction"]},"name":{"type":"string","minLength":1,"maxLength":80},"actionStatus":{"type":"string","enum":["PotentialActionStatus","CompletedActionStatus","FailedActionStatus"]},"object":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":["@type","name","actionStatus"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"}},"role":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"membership_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]},"attachments":{"description":"The rows of the files written beside the message, in id order, on the 201 alone; absent when it carried none.","type":"array","items":{"$ref":"#/components/schemas/conversation.AttachmentCreated"}}},"required":["id","thread_id","parts","role","metadata","membership_id"],"additionalProperties":false},"conversation.Thread":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","organization_id","metadata","data"],"additionalProperties":false},"conversation.Message":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"thread_id":{"$ref":"#/components/schemas/conversation.Uuid"},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":200000}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file"},"url":{"type":"string","minLength":1,"maxLength":2000000,"pattern":"^(?:\\/conversation\\/v1\\/attachments\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|data:(?:text\\/vtt|application\\/json);base64,[A-Za-z0-9+/]*={0,2}$)"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"data-schema.org:Action"},"data":{"type":"object","properties":{"@type":{"type":"string","enum":["ConfirmAction","CancelAction"]},"name":{"type":"string","minLength":1,"maxLength":80},"actionStatus":{"type":"string","enum":["PotentialActionStatus","CompletedActionStatus","FailedActionStatus"]},"object":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":["@type","name","actionStatus"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"}},"role":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"membership_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]}},"required":["id","thread_id","parts","role","metadata","membership_id"],"additionalProperties":false},"conversation.Calendar":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","organization_id","data","metadata"],"additionalProperties":false,"createOnlyProperties":["/properties/id","/properties/organization_id"],"readOnlyProperties":["/properties/metadata"]},"conversation.CalendarEventAnswer":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"calendar_id":{"$ref":"#/components/schemas/conversation.Uuid"},"utc_start":{"$ref":"#/components/schemas/conversation.DateTime"},"utc_end":{"anyOf":[{"$ref":"#/components/schemas/conversation.DateTime"},{"type":"string","const":"infinity"}],"description":"The end of the last occurrence, or `infinity` for a series with no end (JMAP's `after` tests it, draft-ietf-jmap-calendars section 5.11.1)."}},"required":["id","organization_id","data","metadata","calendar_id","utc_start","utc_end"],"additionalProperties":false,"createOnlyProperties":["/properties/id","/properties/organization_id","/properties/calendar_id"],"readOnlyProperties":["/properties/metadata","/properties/utc_start","/properties/utc_end","/properties/data/uid"]},"conversation.Event":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"type":{"type":"string"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"event_at":{"$ref":"#/components/schemas/conversation.DateTime"},"created_at":{"$ref":"#/components/schemas/conversation.DateTime"},"metadata":{"type":"object","properties":{"api_version":{"type":"string"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"sub":{"$ref":"#/components/schemas/conversation.Uuid"},"act":{"$ref":"#/components/schemas/conversation.Uuid"},"object_id":{"$ref":"#/components/schemas/conversation.Uuid"},"error_code":{"type":"string","const":"AccessDenied"},"source_ip_address":{"type":"string"},"user_agent":{"type":"string"},"request_id":{"type":"string"},"access_key_id":{"type":"string"},"client_provided_host_header":{"type":"string"}},"required":["api_version","organization_id"],"additionalProperties":{}},"attachment_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]},"message_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]},"thread_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]},"action_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]},"calendar_event_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]},"calendar_id":{"anyOf":[{"$ref":"#/components/schemas/conversation.Uuid"},{"type":"null"}]}},"required":["id","organization_id","type","data","event_at","created_at","metadata","attachment_id","message_id","thread_id","action_id","calendar_event_id","calendar_id"],"additionalProperties":false},"conversation.ListedThreads":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"messages":{"description":"With `expand=messages`: the newest message you may read, its `parts` the first text part alone with its text cut, or `[]` when you may read none.","type":"array","items":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"thread_id":{"$ref":"#/components/schemas/conversation.Uuid"},"parts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string","maxLength":200000}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file"},"url":{"type":"string","minLength":1,"maxLength":2000000,"pattern":"^(?:\\/conversation\\/v1\\/attachments\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|data:(?:text\\/vtt|application\\/json);base64,[A-Za-z0-9+/]*={0,2}$)"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"data-schema.org:Action"},"data":{"type":"object","properties":{"@type":{"type":"string","enum":["ConfirmAction","CancelAction"]},"name":{"type":"string","minLength":1,"maxLength":80},"actionStatus":{"type":"string","enum":["PotentialActionStatus","CompletedActionStatus","FailedActionStatus"]},"object":{"$ref":"#/components/schemas/conversation.Uuid"}},"required":["@type","name","actionStatus"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"}}},"required":["id","thread_id","parts"],"additionalProperties":false}}},"required":["id","organization_id","metadata","data"],"additionalProperties":false},"conversation.RetrievedThread":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"messages":{"description":"With `expand=messages`: one page of the thread's messages, newest first, as `GET /messages?thread_id=` answers them.","type":"array","items":{"$ref":"#/components/schemas/conversation.ListedMessages"}},"actions":{"description":"With `expand=actions`: the thread's open actions your memberships reach and its newest run (`ReplyAction`) whatever its status, a run's with its chat state.","type":"array","items":{"$ref":"#/components/schemas/conversation.Action"}},"websocket_url":{"description":"With `Origin`: the thread's socket on its holder, its ticket in the query as `access_token` (RFC 6750 section 2.3).","type":"string"},"audience":{"description":"With `websocket_url`: the ticket's `aud`, every holder's host in the order to try them (RFC 7519 section 4.1.3).","type":"array","items":{"type":"string"}}},"required":["id","organization_id","metadata","data"],"additionalProperties":false},"conversation.ThreadCreated":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/conversation.Uuid"},"organization_id":{"$ref":"#/components/schemas/conversation.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"message":{"description":"The thread's first message, when the open carried one.","$ref":"#/components/schemas/conversation.MessageCreated"}},"required":["id","organization_id","metadata","data"],"additionalProperties":false},"conversation.UploadedPart":{"type":"object","properties":{"partNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The part's number, 1 to 10000."},"etag":{"type":"string","description":"The part's etag, which the completion names."}},"required":["partNumber","etag"],"additionalProperties":false},"artifact.ApiErrorBody":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code"],"properties":{"type":{"enum":["invalid_request_error","authentication_error","permission_error","api_error","upstream_error"],"description":"Whose problem it is, from the status."},"code":{"type":"string","description":"What a caller matches on, the standard's word where one exists.","anyOf":[{"const":"parameter_unknown","description":"A parameter this request does not take. `param` names it; the message lists every parameter the request takes, with its bounds and default. https://docs.stripe.com/error-codes#parameter-unknown"},{"const":"parameter_missing","description":"A required parameter is absent. `param` names it. https://docs.stripe.com/error-codes#parameter-missing"},{"const":"parameter_invalid_integer","description":"A whole number was expected. `param` names the parameter. https://docs.stripe.com/error-codes#parameter-invalid-integer"},{"const":"parameter_invalid_string_empty","description":"A parameter was sent as the empty string, `?limit=`. `param` names it; the message states what it accepts. https://docs.stripe.com/error-codes#parameter-invalid-string-empty"},{"const":"parameters_exclusive","description":"Two parameters that exclude each other were both sent, `starting_after` and `ending_before`: `param` `ending_before`, the message saying which to send. https://docs.stripe.com/error-codes#parameters-exclusive"},{"const":"invalid_request","description":"400: the query or the body does not match its schema, or a door's own check refused a value; `param` names the field and `message` says what is accepted."},{"const":"payload_too_large","description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14)."},{"const":"invalid_token","description":"401: no credential, or one expired, forged or unknown (RFC 6750 section 3.1, https://datatracker.ietf.org/doc/html/rfc6750#section-3.1); on `GET /artifact/v1/devices/{id}`, a service token's secret that opens nothing."},{"const":"user_required","description":"403: the door judges a person's memberships, and the credential is a device's."},{"const":"forbidden","description":"403: your policy does not admit this create, or the create's statement wrote nothing (`POST /artifact/v1/artifacts` also for no such program or a key outside its prefix)."},{"const":"method_not_allowed","description":"405: this path does not answer this method; `Allow` lists those it does."},{"const":"unique_violation","description":"409: Postgres's condition 23505 (https://www.postgresql.org/docs/current/errcodes-appendix.html): a row already holds this unique value, the constraint named in `message`."},{"const":"foreign_key_violation","description":"409: Postgres's condition 23503: a link names a row that does not exist, or a row still named by another, the constraint named in `message`."},{"const":"restrict_violation","description":"409: Postgres's condition 23001: a row another row still names under a RESTRICT key, the constraint named in `message`."},{"const":"check_violation","description":"409: Postgres's condition 23514: a value a check constraint refuses, the constraint named in `message`."},{"const":"domain_unavailable","description":"409 on `POST /artifact/v1/registrations`: Cloudflare will not register the name and gave no reason of its own; with one, the code is Cloudflare's `reason`."},{"const":"upstream_error","description":"502: Cloudflare or PlanetScale refused a call and named no code of its own, or Cloudflare quoted no price; with one, the code is the vendor's."},{"const":"password_missing","description":"502 on `POST /artifact/v1/deployments`: PlanetScale answered the role it created with no password."},{"const":"role_not_ready","description":"502 on `POST /artifact/v1/deployments`: the PlanetScale role was not ready after 30 tries."},{"const":"registration_failed","description":"502 on `POST /artifact/v1/registrations`: Cloudflare's registration workflow failed and named no error code; nothing is recorded."},{"const":"registration_blocked","description":"502 on `POST /artifact/v1/registrations`: Cloudflare's registration workflow was blocked and named no error code; nothing is recorded."},{"const":"server_error","description":"500: a fault on this side, such as a hostname device that holds no vendor token row the road reads. The entry rewrites every 500 a door answers (`faultResponse` of `@jedger/api-sdk-integrations-jedger`): `message` says only that the text is in the Worker's log and `request_id` is the Ray ID it is logged under, so the log, not the body, names what is missing."},{"const":"resource_missing","description":"404, Stripe's code for what does not exist (https://docs.stripe.com/error-codes#resource-missing): no row has this `{id}`, the `{id}` is no UUID, your policy hides the row, or your policy does not admit this PATCH or DELETE; a release's bytes that are not in the bucket; a path this Worker does not serve; and, answered by the entry before any door runs, a path that ends in `.data` or a query that carries `_routes`, React Router's single-fetch, which this Worker answers to no one."},{"const":"bad_gateway","description":"RFC 9110 section 15.6.3's 502 (https://www.rfc-editor.org/rfc/rfc9110#section-15.6.3): another jedger door this one called refused; the message names it."},{"const":"service_unavailable","description":"RFC 9110 section 15.6.4's 503 (https://www.rfc-editor.org/rfc/rfc9110#section-15.6.4): the database could not be reached; retry."},{"const":"gateway_timeout","description":"RFC 9110 section 15.6.5's 504 (https://www.rfc-editor.org/rfc/rfc9110#section-15.6.5), the hub's on a `GET` or `HEAD`: the answer's headers took longer than 5 s."},{"type":"string","description":"A vendor's own code a door passes through on a refusal it relays."}]},"message":{"type":"string","description":"What was wrong and what is accepted, for a person or an agent to read. On a 500 it names nothing internal: for a thrown error its class and, when Postgres raised it, its SQLSTATE; for a 500 a door answered itself, only that its text is logged. The whole text is in the Worker's log under `request_id`."},"param":{"type":"string","description":"The parameter that was refused, its path in the request: `data.schema.org:name`, `0.object_id`, `id`."},"request_id":{"type":"string","description":"On a 500 alone: the request's Ray ID, its `CF-Ray` header (https://developers.cloudflare.com/fundamentals/reference/http-headers/#cf-ray), which the Worker's log holds the fault's whole text under. Absent when the request did not come through Cloudflare."}}}}},"artifact.Uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"artifact.DateTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"artifact.ArtifactCreateRequest":{"type":"object","properties":{"program_name":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"version":{"type":"string","maxLength":64,"pattern":"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"},"target":{"type":"string","minLength":1,"maxLength":128},"data":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":1024},"size":{"type":"integer","exclusiveMinimum":0,"maximum":10737418240},"signature":{"type":"string","minLength":1,"maxLength":4096},"key_id":{"type":"string","minLength":1,"maxLength":128}},"additionalProperties":{"anyOf":[{"type":["string","number","boolean"]},{"type":"array","items":{"type":["string","number","boolean"]}}]}}},"required":["program_name","version","target"],"additionalProperties":false},"artifact.CardCreateRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"artifact_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deployment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"device_credential_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"program_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"service_token_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["organization_id"],"additionalProperties":false},"artifact.CardPatch":{"type":"object","properties":{"data":{"type":"object","properties":{},"additionalProperties":{}}},"additionalProperties":false},"artifact.DeploymentCreateRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"device_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"artifact_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","enum":["spec","current"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/artifact.DeploymentDataValue"}}},"required":["device_id","artifact_id","status"],"additionalProperties":false},"artifact.DeploymentDataValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/artifact.DeploymentDataValue"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/artifact.DeploymentDataValue"}}]},"artifact.DeploymentPatch":{"type":"object","properties":{"artifact_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/artifact.DeploymentDataValue"},{"type":"null"}]}}},"additionalProperties":false},"artifact.DeviceCreateRequest":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data":{"type":"object","properties":{"pkR":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"}},"name":{"type":"string","minLength":1,"maxLength":128},"label":{"not":{}},"onvif.org:OutputLevel":{"type":"integer","minimum":0,"maximum":100,"description":"The speaker's volume, an integer, ONVIF's AudioOutputConfiguration OutputLevel (https://www.onvif.org/ver10/schema/onvif.xsd). Its range is the device's own, ONVIF's OutputLevelRange; this door holds 0 to 100, what the one device reading it takes. The device reads it off the row its sign-in answers."},"openid.net:locale":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$","description":"The language the device speaks, a BCP 47 tag, OpenID Connect's locale claim (https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims). The device reads it off the row its sign-in answers, and its device JWT carries it to the live turn the conversation Worker mints. Absent, the device has no language of its own.","externalDocs":{"url":"https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims"}},"schema.org:duration":{"type":"string","format":"duration","pattern":"^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$","description":"The silence that closes the device's session, an ISO 8601 duration such as PT30S, schema.org's duration (https://schema.org/duration). The device reads it off the row its sign-in answers; no JWT carries it. Absent, the device keeps its own default.","externalDocs":{"url":"https://schema.org/duration"}}},"additionalProperties":{"anyOf":[{"type":["string","number","boolean"]},{"type":"array","items":{"type":["string","number","boolean"]}}]}}},"required":["organization_id"],"additionalProperties":false},"artifact.DeviceCredentialCreateRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"device_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deployment_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":65536},{"type":"null"}]},"data":{"type":"object","properties":{"name":{"type":"string","maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["name"],"additionalProperties":{"anyOf":[{"type":["string","number","boolean"]},{"type":"array","items":{"type":["string","number","boolean"]}}]}}},"required":["device_id","data"],"additionalProperties":false},"artifact.DeviceCredentialPatch":{"type":"object","properties":{"value":{"anyOf":[{"type":"string","minLength":1,"maxLength":65536},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"anyOf":[{"type":["string","number","boolean"]},{"type":"array","items":{"type":["string","number","boolean"]}}]},{"type":"null"}]}}},"additionalProperties":false},"artifact.DevicePatch":{"type":"object","properties":{"data":{"type":"object","properties":{"pkR":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"}},{"type":"null"}]},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"label":{"not":{}},"hostname":{"not":{}},"runtime":{"not":{}},"onvif.org:OutputLevel":{"anyOf":[{"type":"integer","minimum":0,"maximum":100,"description":"The speaker's volume, an integer, ONVIF's AudioOutputConfiguration OutputLevel (https://www.onvif.org/ver10/schema/onvif.xsd). Its range is the device's own, ONVIF's OutputLevelRange; this door holds 0 to 100, what the one device reading it takes. The device reads it off the row its sign-in answers."},{"type":"null"}]},"openid.net:locale":{"anyOf":[{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$","description":"The language the device speaks, a BCP 47 tag, OpenID Connect's locale claim (https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims). The device reads it off the row its sign-in answers, and its device JWT carries it to the live turn the conversation Worker mints. Absent, the device has no language of its own."},{"type":"null"}],"externalDocs":{"url":"https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims"}},"schema.org:duration":{"anyOf":[{"type":"string","format":"duration","pattern":"^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$","description":"The silence that closes the device's session, an ISO 8601 duration such as PT30S, schema.org's duration (https://schema.org/duration). The device reads it off the row its sign-in answers; no JWT carries it. Absent, the device keeps its own default."},{"type":"null"}],"externalDocs":{"url":"https://schema.org/duration"}}},"additionalProperties":{"anyOf":[{"anyOf":[{"type":["string","number","boolean"]},{"type":"array","items":{"type":["string","number","boolean"]}}]},{"type":"null"}]}}},"additionalProperties":false},"artifact.DeviceSelfPatch":{"type":"object","properties":{"data":{"type":"object","properties":{"pkR":{"minItems":1,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"}},"lan_address":{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},"hostname":{"type":"string","format":"hostname","pattern":"^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$"}},"additionalProperties":false}},"required":["data"],"additionalProperties":false},"artifact.ProgramCreateRequest":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":128},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":["string","number","boolean"]},{"type":"array","items":{"type":["string","number","boolean"]}}]}}},"required":["organization_id","name"],"additionalProperties":false},"artifact.RegistrationCreateRequest":{"type":"object","properties":{"organization_id":{"$ref":"#/components/schemas/artifact.Uuid"},"data":{"type":"object","properties":{"domain_name":{"type":"string","maxLength":253,"pattern":"^(?=.{1,253}$)([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$","description":"The name to buy, `sweetbalance.app`: Cloudflare's own key, unique across jedger."},"auto_renew":{"default":true,"description":"Cloudflare's own key; `true` when absent, since its API renews nothing yet.","type":"boolean"}},"required":["domain_name"],"additionalProperties":false},"max_price":{"type":"string","pattern":"^\\d+(\\.\\d{1,2})?$","description":"The most the first year may cost, `\"10.00\"`, in the currency Cloudflare quotes (`pricing.currency`); EC2's `MaxPrice`."}},"required":["organization_id","data","max_price"],"additionalProperties":false},"artifact.ServiceTokenCreateRequest":{"type":"object","properties":{"device_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["device_id"],"additionalProperties":false},"artifact.Artifact":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"version":{"type":"string"},"target":{"type":"string"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"program_name":{"type":"string"}},"required":["id","version","target","metadata","data","program_name"],"additionalProperties":false},"artifact.Card":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"device_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"organization_id":{"$ref":"#/components/schemas/artifact.Uuid"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"artifact_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"deployment_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"device_credential_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"program_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"service_token_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]}},"required":["id","device_id","organization_id","data","metadata","artifact_id","deployment_id","device_credential_id","program_id","service_token_id"],"additionalProperties":false},"artifact.Deployment":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"device_id":{"$ref":"#/components/schemas/artifact.Uuid"},"artifact_id":{"$ref":"#/components/schemas/artifact.Uuid"},"status":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","device_id","artifact_id","status","data","metadata"],"additionalProperties":false},"artifact.Device":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"organization_id":{"$ref":"#/components/schemas/artifact.Uuid"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","metadata","organization_id","data"],"additionalProperties":false},"artifact.DeviceCredential":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"value":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"device_id":{"$ref":"#/components/schemas/artifact.Uuid"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"deployment_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]}},"required":["id","value","metadata","device_id","data","deployment_id"],"additionalProperties":false},"artifact.Event":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"organization_id":{"$ref":"#/components/schemas/artifact.Uuid"},"type":{"type":"string"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"event_at":{"$ref":"#/components/schemas/artifact.DateTime"},"created_at":{"$ref":"#/components/schemas/artifact.DateTime"},"metadata":{"type":"object","properties":{"api_version":{"type":"string"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sub":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"act":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"error_code":{"type":"string","const":"AccessDenied"},"source_ip_address":{"type":"string"},"user_agent":{"type":"string"},"request_id":{"type":"string"},"access_key_id":{"type":"string"}},"required":["api_version","organization_id"],"additionalProperties":{}},"artifact_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"card_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"deployment_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"device_credential_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"device_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"program_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"service_token_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]},"registration_id":{"anyOf":[{"$ref":"#/components/schemas/artifact.Uuid"},{"type":"null"}]}},"required":["id","organization_id","type","data","event_at","created_at","metadata","artifact_id","card_id","deployment_id","device_credential_id","device_id","program_id","service_token_id","registration_id"],"additionalProperties":false},"artifact.Program":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"name":{"type":"string"},"organization_id":{"$ref":"#/components/schemas/artifact.Uuid"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","name","organization_id","data","metadata"],"additionalProperties":false},"artifact.Registration":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"organization_id":{"$ref":"#/components/schemas/artifact.Uuid"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","organization_id","data","metadata"],"additionalProperties":false},"artifact.ServiceTokenCreated":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/artifact.Uuid"},"device_id":{"$ref":"#/components/schemas/artifact.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secret":{"type":"string","description":"The service token's secret, answered once; only its hash is kept."}},"required":["id","device_id","metadata","secret"],"additionalProperties":false},"design.ApiErrorBody":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code"],"properties":{"type":{"enum":["invalid_request_error","authentication_error","permission_error","api_error","upstream_error"],"description":"Whose problem it is, from the status."},"code":{"type":"string","description":"What a caller matches on, the standard's word where one exists.","anyOf":[{"const":"parameter_unknown","description":"A parameter this request does not take. `param` names it; the message lists every parameter the request takes, with its bounds and default. https://docs.stripe.com/error-codes#parameter-unknown"},{"const":"parameter_missing","description":"A required parameter is absent. `param` names it. https://docs.stripe.com/error-codes#parameter-missing"},{"const":"parameter_invalid_integer","description":"A whole number was expected. `param` names the parameter. https://docs.stripe.com/error-codes#parameter-invalid-integer"},{"const":"parameter_invalid_string_empty","description":"A parameter was sent as the empty string, `?limit=`. `param` names it; the message states what it accepts. https://docs.stripe.com/error-codes#parameter-invalid-string-empty"},{"const":"parameters_exclusive","description":"Two parameters that exclude each other were both sent, `starting_after` and `ending_before`: `param` `ending_before`, the message saying which to send. https://docs.stripe.com/error-codes#parameters-exclusive"},{"const":"invalid_request","description":"A body, a query parameter or `If-Match` the door does not take: an unknown key, `metadata` among them, a missing or malformed value, or two arms mixed. `param` names the first field refused, absent when the refusal is an unknown key or the whole body (no JSON); `message` says what was wrong."},{"const":"payload_too_large","description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14)."},{"const":"invalid_token","description":"RFC 6750 section 3.1's: a door that needs a caller got no credential, or one expired or forged."},{"const":"user_required","description":"jedger's: the door judges a person's memberships and the credential is a device's JWT."},{"const":"forbidden","description":"A create your policy refuses, or one whose `schema.org:about` names a card you may not read or of another organization, another organization, or a membership the organization keeps no card about, or a page with a maintainer and no `schema.org:about`; the refused write is recorded as an `AccessDenied` event."},{"const":"method_not_allowed","description":"RFC 9110 section 15.5.6's: the path does not answer this method; `Allow` lists the methods it does."},{"const":"resource_missing","description":"Stripe's (https://docs.stripe.com/error-codes#resource-missing): no row has this `{id}` (or this `source_url`), `{id}` is no UUID, or your memberships do not reach the row, and a PATCH or DELETE your policy refuses answers the same; also answered by the entry (`createFetchHandler`) before any door runs, when the path ends in `.data` or the query carries `_routes`, a single-fetch request this Worker answers none of."},{"const":"precondition_required","description":"RFC 6585 section 3's: a page's PATCH carried no `If-Match`, or `If-Match: *`; `param` is `If-Match`."},{"const":"conflict","description":"RFC 9110 section 15.5.10's: the page changed after the read the `If-Match` names; read it again and send the change with its new `ETag`."},{"const":"unique_violation","description":"Postgres's condition (SQLSTATE 23505): a value another row holds, a redirect's `source_url`; the message names the constraint."},{"const":"foreign_key_violation","description":"Postgres's condition (SQLSTATE 23503): `organization_id` names no organization; the message names the constraint."},{"const":"restrict_violation","description":"Postgres's condition (SQLSTATE 23001): a row another row restricts; the message names the constraint."},{"const":"check_violation","description":"Postgres's condition (SQLSTATE 23514): a value a check constraint refuses; the message names the constraint."},{"const":"server_error","description":"OAuth's (RFC 6749 section 4.1.2.1): a fault on this side; the message names the error's class and SQLSTATE alone, and `request_id` the Ray ID its whole text is logged under."},{"const":"bad_gateway","description":"RFC 9110 section 15.6.3's: a door this one called, iam's or conversation's, answered a fault; the message names it."},{"const":"service_unavailable","description":"RFC 9110 section 15.6.4's: the database could not be reached; retry."},{"const":"gateway_timeout","description":"RFC 9110 section 15.6.5's 504 (https://www.rfc-editor.org/rfc/rfc9110#section-15.6.5), the hub's on a `GET` or `HEAD`: the answer's headers took longer than 5 s."},{"type":"string","description":"A vendor's own code a door passes through on a refusal it relays."}]},"message":{"type":"string","description":"What was wrong and what is accepted, for a person or an agent to read. On a 500 it names nothing internal: for a thrown error its class and, when Postgres raised it, its SQLSTATE; for a 500 a door answered itself, only that its text is logged. The whole text is in the Worker's log under `request_id`."},"param":{"type":"string","description":"The parameter that was refused, its path in the request: `data.schema.org:name`, `0.object_id`, `id`."},"request_id":{"type":"string","description":"On a 500 alone: the request's Ray ID, its `CF-Ray` header (https://developers.cloudflare.com/fundamentals/reference/http-headers/#cf-ray), which the Worker's log holds the fault's whole text under. Absent when the request did not come through Cloudflare."}}}}},"design.Uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"design.DateTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"design.AttachmentAnswer":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/design.Uuid"},"organization_id":{"$ref":"#/components/schemas/design.Uuid"},"page_id":{"$ref":"#/components/schemas/design.Uuid"},"filename":{"type":["string","null"]},"media_type":{"type":"string"},"size":{"description":"The file's octets; null while the row waits for its bytes.","anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"$ref":"#/components/schemas/design.AttachmentData"}},"required":["id","organization_id","page_id","filename","media_type","size","metadata","data"],"additionalProperties":false},"design.AttachmentCreateBody":{"type":"object","properties":{"page_id":{"description":"The page that shows the file, `design.pages.id`.","$ref":"#/components/schemas/design.Uuid"},"filename":{"description":"The name the file is answered under, `Content-Disposition`'s `filename`.","type":"string","minLength":1,"maxLength":998},"id":{"description":"The row's id, minted by the caller as a uuidv7; absent, the statement mints one.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"media_type":{"type":"string","enum":["image/webp","image/png","image/jpeg","image/svg+xml","video/mp4","audio/mpeg"],"description":"The media type the file will have; the PUT that brings its bytes must name the same."},"data":{"$ref":"#/components/schemas/design.AttachmentData"}},"required":["page_id","media_type"],"additionalProperties":false},"design.AttachmentData":{"type":"object","properties":{"schema.org:name":{"type":"string","minLength":1,"maxLength":200,"description":"The title a person reads, [schema.org name](https://schema.org/name); absent, the filename is shown.","externalDocs":{"url":"https://schema.org/name"}},"schema.org:description":{"type":"string","minLength":1,"maxLength":2000,"description":"A person's memo about the file, [schema.org description](https://schema.org/description).","externalDocs":{"url":"https://schema.org/description"}},"schema.org:thumbnail":{"description":"The id of another file of the same page, an image, that pictures this one, [schema.org thumbnail](https://schema.org/thumbnail).","$ref":"#/components/schemas/design.Uuid","externalDocs":{"url":"https://schema.org/thumbnail"}},"ai-sdk.dev:generateSpeech":{"description":"The call that makes this sound: [AI SDK generateSpeech](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-speech)'s own parameters, at most one recipe per file.","$ref":"#/components/schemas/design.GenerateSpeech","externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}},"ai-sdk.dev:experimental_generateVideo":{"description":"The call that makes this video: [AI SDK experimental_generateVideo](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-video)'s own parameters, at most one recipe per file.","$ref":"#/components/schemas/design.GenerateVideo","externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}},"ai-sdk.dev:generateImage":{"description":"The call that makes this image: [AI SDK generateImage](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-image)'s own parameters, at most one recipe per file.","$ref":"#/components/schemas/design.GenerateImage","externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}}},"additionalProperties":false},"design.AttachmentDataPatch":{"type":"object","properties":{"schema.org:name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200,"description":"The title a person reads, [schema.org name](https://schema.org/name); absent, the filename is shown."},{"type":"null"}],"externalDocs":{"url":"https://schema.org/name"}},"schema.org:description":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000,"description":"A person's memo about the file, [schema.org description](https://schema.org/description)."},{"type":"null"}],"externalDocs":{"url":"https://schema.org/description"}},"schema.org:thumbnail":{"anyOf":[{"description":"The id of another file of the same page, an image, that pictures this one, [schema.org thumbnail](https://schema.org/thumbnail).","$ref":"#/components/schemas/design.Uuid"},{"type":"null"}],"externalDocs":{"url":"https://schema.org/thumbnail"}},"ai-sdk.dev:generateSpeech":{"anyOf":[{"description":"The call that makes this sound: [AI SDK generateSpeech](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-speech)'s own parameters, at most one recipe per file.","$ref":"#/components/schemas/design.GenerateSpeech"},{"type":"null"}],"externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}},"ai-sdk.dev:experimental_generateVideo":{"anyOf":[{"description":"The call that makes this video: [AI SDK experimental_generateVideo](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-video)'s own parameters, at most one recipe per file.","$ref":"#/components/schemas/design.GenerateVideo"},{"type":"null"}],"externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}},"ai-sdk.dev:generateImage":{"anyOf":[{"description":"The call that makes this image: [AI SDK generateImage](https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-image)'s own parameters, at most one recipe per file.","$ref":"#/components/schemas/design.GenerateImage"},{"type":"null"}],"externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}}},"additionalProperties":false},"design.AttachmentPatch":{"type":"object","properties":{"filename":{"description":"The name the file is answered under; null removes it.","anyOf":[{"type":"string","minLength":1,"maxLength":998},{"type":"null"}]},"data":{"$ref":"#/components/schemas/design.AttachmentDataPatch"}},"additionalProperties":false},"design.GenerateImage":{"type":"object","properties":{"model":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*:\\S{1,200}$","description":"The [AI SDK provider registry](https://ai-sdk.dev/docs/reference/ai-sdk-core/provider-registry)'s `<provider>:<model id>`, such as `comfyui:ace-step-1.5`."},"prompt":{"type":"string","minLength":1,"maxLength":20000},"n":{"type":"integer","minimum":1,"maximum":9007199254740991},"size":{"type":"string","maxLength":20},"aspectRatio":{"type":"string","maxLength":20},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"providerOptions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["model","prompt"],"additionalProperties":false},"design.GenerateSpeech":{"type":"object","properties":{"model":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*:\\S{1,200}$","description":"The [AI SDK provider registry](https://ai-sdk.dev/docs/reference/ai-sdk-core/provider-registry)'s `<provider>:<model id>`, such as `comfyui:ace-step-1.5`."},"text":{"type":"string","minLength":1,"maxLength":20000},"voice":{"type":"string","maxLength":200},"outputFormat":{"type":"string","maxLength":50},"instructions":{"type":"string","maxLength":20000},"speed":{"type":"number","exclusiveMinimum":0},"language":{"type":"string","maxLength":35},"providerOptions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["model","text"],"additionalProperties":false},"design.GenerateVideo":{"type":"object","properties":{"model":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*:\\S{1,200}$","description":"The [AI SDK provider registry](https://ai-sdk.dev/docs/reference/ai-sdk-core/provider-registry)'s `<provider>:<model id>`, such as `comfyui:ace-step-1.5`."},"prompt":{"type":"string","minLength":1,"maxLength":20000},"n":{"type":"integer","minimum":1,"maximum":9007199254740991},"aspectRatio":{"type":"string","maxLength":20},"resolution":{"type":"string","maxLength":20},"duration":{"type":"number","exclusiveMinimum":0},"fps":{"type":"number","exclusiveMinimum":0},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"generateAudio":{"type":"boolean"},"providerOptions":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["model","prompt"],"additionalProperties":false},"design.Page":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/design.Uuid"},"organization_id":{"$ref":"#/components/schemas/design.Uuid"},"lang":{"type":"string"},"data":{"$ref":"#/components/schemas/design.PageData"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"updated_at":{"$ref":"#/components/schemas/design.DateTime"}},"required":["id","organization_id","lang","data","metadata","updated_at"],"additionalProperties":false},"design.PageCreateRequest":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"lang":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"data":{"$ref":"#/components/schemas/design.PageData"},"schema.org:about":{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/design.Uuid"},{"type":"string","pattern":"^iam\\/(cards|organizations)\\/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}]},"externalDocs":{"url":"https://schema.org/about"}},"w3.org:audience":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/design.Uuid"},"externalDocs":{"url":"https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience"}},"schema.org:maintainer":{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/design.Uuid"},"externalDocs":{"url":"https://schema.org/maintainer"}}},"required":["organization_id","lang","data"],"additionalProperties":false},"design.PageData":{"type":"object","properties":{"schema.org:name":{"type":"string","minLength":1,"maxLength":200,"externalDocs":{"url":"https://schema.org/name"}},"schema.org:keywords":{"$ref":"#/components/schemas/design.PageKeywords","externalDocs":{"url":"https://schema.org/keywords"}},"sections":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/design.PageSection"}},"localizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"$ref":"#/components/schemas/design.PageLocalization"}}},"required":["schema.org:name","sections"],"additionalProperties":false},"design.PageDataPatch":{"type":"object","properties":{"schema.org:name":{"type":"string","minLength":1,"maxLength":200,"externalDocs":{"url":"https://schema.org/name"}},"schema.org:keywords":{"anyOf":[{"$ref":"#/components/schemas/design.PageKeywords"},{"type":"null"}],"externalDocs":{"url":"https://schema.org/keywords"}},"sections":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/design.PageSection"}},"localizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"$ref":"#/components/schemas/design.PageLocalization"}}},"additionalProperties":false},"design.PageKeywords":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"design.PageLocalization":{"type":"object","properties":{"sections":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/design.PageSection"}},"schema.org:name":{"type":"string","minLength":1,"maxLength":200,"externalDocs":{"url":"https://schema.org/name"}}},"required":["sections"],"additionalProperties":false},"design.PagePatch":{"type":"object","properties":{"lang":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"data":{"$ref":"#/components/schemas/design.PageDataPatch"},"schema.org:about":{"anyOf":[{"minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/design.Uuid"},{"type":"string","pattern":"^iam\\/(cards|organizations)\\/([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"}]}},{"type":"null"}],"externalDocs":{"url":"https://schema.org/about"}},"w3.org:audience":{"anyOf":[{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/design.Uuid"}},{"type":"null"}],"externalDocs":{"url":"https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience"}},"schema.org:maintainer":{"anyOf":[{"minItems":1,"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/design.Uuid"}},{"type":"null"}],"externalDocs":{"url":"https://schema.org/maintainer"}}},"additionalProperties":false},"design.PageSection":{"anyOf":[{"type":"object","properties":{"html":{"type":"string","minLength":1,"maxLength":200000}},"required":["html"],"additionalProperties":false},{"type":"object","properties":{"srcdoc":{"type":"string","minLength":1,"maxLength":500000}},"required":["srcdoc"],"additionalProperties":false},{"type":"object","properties":{"markdown":{"type":"string","minLength":1,"maxLength":200000}},"required":["markdown"],"additionalProperties":false}]},"design.RedirectCreateRequest":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"source_url":{"type":"string","minLength":1,"maxLength":2048,"allOf":[{"pattern":"^[^\\s?#]+$"},{"pattern":"^[a-z0-9-]+(\\.[a-z0-9-]+)*\\/[^\\s?#:]*$"}]},"data":{"type":"object","properties":{"target_url":{"type":"string","format":"uri"},"status_code":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}]},"preserve_query_string":{"type":"boolean"},"schema.org:interactionStatistic":{"$ref":"#/components/schemas/design.RedirectInteractionStatistic","externalDocs":{"url":"https://schema.org/interactionStatistic"}}},"required":["target_url","status_code","preserve_query_string"],"additionalProperties":false}},"required":["organization_id","source_url","data"],"additionalProperties":false},"design.RedirectData":{"type":"object","properties":{"target_url":{"type":"string","format":"uri"},"status_code":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}]},"preserve_query_string":{"type":"boolean"},"schema.org:interactionStatistic":{"$ref":"#/components/schemas/design.RedirectInteractionStatistic","externalDocs":{"url":"https://schema.org/interactionStatistic"}}},"required":["target_url","status_code","preserve_query_string"],"additionalProperties":false},"design.RedirectInteractionStatistic":{"type":"object","properties":{"@type":{"type":"string","const":"InteractionCounter"},"interactionType":{"type":"string","const":"https://schema.org/UseAction"},"userInteractionCount":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["@type","interactionType","userInteractionCount"],"additionalProperties":false,"readOnly":true,"description":"The redirect's uses, counted by the statement as a site follows it (https://schema.org/interactionStatistic); a create or a PATCH may carry it as read and its value is ignored (JSON Schema's readOnly). Absent before the first use."},"design.RedirectPatch":{"type":"object","properties":{"source_url":{"type":"string","minLength":1,"maxLength":2048,"allOf":[{"pattern":"^[^\\s?#]+$"},{"pattern":"^[a-z0-9-]+(\\.[a-z0-9-]+)*\\/[^\\s?#:]*$"}]},"data":{"type":"object","properties":{"target_url":{"type":"string","format":"uri"},"status_code":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}]},"preserve_query_string":{"type":"boolean"},"schema.org:interactionStatistic":{"$ref":"#/components/schemas/design.RedirectInteractionStatistic","externalDocs":{"url":"https://schema.org/interactionStatistic"}}},"additionalProperties":false}},"additionalProperties":false},"design.RedirectUsePatch":{"type":"object","properties":{"data":{"type":"object","properties":{"schema.org:interactionStatistic":{"type":"object","properties":{"@type":{"type":"string","const":"InteractionCounter"},"interactionType":{"type":"string","const":"https://schema.org/UseAction"}},"required":["@type","interactionType"],"additionalProperties":false,"externalDocs":{"url":"https://schema.org/interactionStatistic"}}},"required":["schema.org:interactionStatistic"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"description":"One use of the redirect, counted: the statement adds one to `data.schema.org:interactionStatistic.userInteractionCount`; sent with a site's device JWT."},"design.Organization":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/design.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"$ref":"#/components/schemas/design.OrganizationData"}},"required":["id","metadata","data"],"additionalProperties":false},"design.OrganizationData":{"type":"object","properties":{"language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"name":{"type":"object","properties":{"@type":{"type":"string","const":"Name"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"NameComponent"},"kind":{"type":"string","enum":["title","given","given2","surname","surname2","credential","generation","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"defaultSeparator":{"type":"string"},"full":{"type":"string"},"sortAs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"phoneticSystem":{"type":"string"},"phoneticScript":{"type":"string"}},"additionalProperties":false},"nicknames":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Nickname"},"name":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100}},"required":["name"],"additionalProperties":false}},"localizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"titles":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Title"},"name":{"type":"string"},"kind":{"type":"string","enum":["title","role"]},"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"}},"required":["name"],"additionalProperties":false}},"emails":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"EmailAddress"},"address":{"type":"string","pattern":"^[^\\s@:]+@[^\\s@]+$"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["address"],"additionalProperties":false}},"phones":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Phone"},"number":{"type":"string","pattern":"^tel:\\+\\d+$"},"features":{"type":"object","propertyNames":{"type":"string","enum":["mobile","voice","text","video","main-number","textphone","fax","pager"]},"additionalProperties":{"type":"boolean","const":true}},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["number"],"additionalProperties":false}},"links":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Link"},"kind":{"type":"string","const":"contact"},"uri":{"type":"string","format":"uri"},"mediaType":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["uri"],"additionalProperties":false}},"addresses":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"anniversaries":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Anniversary"},"kind":{"type":"string","enum":["birth","death","wedding"]},"date":{"anyOf":[{"type":"object","properties":{"@type":{"type":"string","const":"PartialDate"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"month":{"type":"integer","minimum":1,"maximum":12},"day":{"type":"integer","minimum":1,"maximum":31},"calendarScale":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Timestamp"},"utc":{"type":"string"}},"required":["utc"],"additionalProperties":false}]},"place":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"required":["date"],"additionalProperties":false}},"notes":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Note"},"note":{"type":"string"},"created":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["note"],"additionalProperties":false}},"media":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"@type":{"type":"string","const":"Media"},"kind":{"type":"string","const":"logo"},"uri":{"type":"string","pattern":"^https:\\/\\/api\\.(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\/iam\\/v1\\/organizations\\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\/logo\\.svg$"},"mediaType":{"type":"string","const":"image/svg+xml"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["kind","uri"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Media"},"kind":{"type":"string","enum":["photo","sound"]},"uri":{"type":"string","maxLength":2048,"format":"uri"},"mediaType":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["kind","uri"],"additionalProperties":false}],"type":"object"}},"w3.org:identifier":{"type":"object","propertyNames":{"type":"string","pattern":"^(\\d{4}|[A-Z]{2}:[A-Za-z0-9]+)$"},"additionalProperties":{"type":"string","pattern":"^\\d+$"}},"kind":{"type":"string","const":"org"},"schema.org:slogan":{"type":"string","minLength":1,"externalDocs":{"url":"https://schema.org/slogan"}}},"required":["kind"],"additionalProperties":false},"design.Event":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/design.Uuid"},"organization_id":{"$ref":"#/components/schemas/design.Uuid"},"type":{"type":"string"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"event_at":{"$ref":"#/components/schemas/design.DateTime"},"created_at":{"$ref":"#/components/schemas/design.DateTime"},"metadata":{"type":"object","properties":{"api_version":{"type":"string"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sub":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"act":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"error_code":{"type":"string","const":"AccessDenied"},"source_ip_address":{"type":"string"},"user_agent":{"type":"string"},"request_id":{"type":"string"},"access_key_id":{"type":"string"},"request_parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["api_version","organization_id"],"additionalProperties":{}},"page_id":{"anyOf":[{"$ref":"#/components/schemas/design.Uuid"},{"type":"null"}]},"redirect_id":{"anyOf":[{"$ref":"#/components/schemas/design.Uuid"},{"type":"null"}]},"attachment_id":{"anyOf":[{"$ref":"#/components/schemas/design.Uuid"},{"type":"null"}]}},"required":["id","organization_id","type","data","event_at","created_at","metadata","page_id","redirect_id","attachment_id"],"additionalProperties":false},"design.Redirect":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/design.Uuid"},"organization_id":{"$ref":"#/components/schemas/design.Uuid"},"source_url":{"type":"string"},"data":{"$ref":"#/components/schemas/design.RedirectData"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","organization_id","source_url","data","metadata"],"additionalProperties":false},"design.PageWithOrganization":{"type":"object","properties":{"design":{"type":"object","properties":{"pages":{"$ref":"#/components/schemas/design.Page"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/design.AttachmentAnswer"}}},"required":["pages","attachments"],"additionalProperties":false},"iam":{"type":"object","properties":{"organizations":{"anyOf":[{"$ref":"#/components/schemas/design.Organization"},{"type":"null"}]}},"required":["organizations"],"additionalProperties":false}},"required":["design","iam"],"additionalProperties":false},"iam.ApiErrorBody":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code"],"properties":{"type":{"enum":["invalid_request_error","authentication_error","permission_error","api_error","upstream_error"],"description":"Whose problem it is, from the status."},"code":{"type":"string","description":"What a caller matches on, the standard's word where one exists.","anyOf":[{"const":"parameter_unknown","description":"A parameter this request does not take. `param` names it; the message lists every parameter the request takes, with its bounds and default. https://docs.stripe.com/error-codes#parameter-unknown"},{"const":"parameter_missing","description":"A required parameter is absent. `param` names it. https://docs.stripe.com/error-codes#parameter-missing"},{"const":"parameter_invalid_integer","description":"A whole number was expected. `param` names the parameter. https://docs.stripe.com/error-codes#parameter-invalid-integer"},{"const":"parameter_invalid_string_empty","description":"A parameter was sent as the empty string, `?limit=`. `param` names it; the message states what it accepts. https://docs.stripe.com/error-codes#parameter-invalid-string-empty"},{"const":"parameters_exclusive","description":"Two parameters that exclude each other were both sent, `starting_after` and `ending_before`: `param` `ending_before`, the message saying which to send. https://docs.stripe.com/error-codes#parameters-exclusive"},{"const":"invalid_request","description":"OAuth's (RFC 6749 section 4.1.2.1, https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1): a query or a body refused before any statement, a value malformed or missing, a key unknown (`metadata` among them), a key named twice in one object; `param` names it where one parameter is at fault, and the message says what is accepted."},{"const":"payload_too_large","description":"The request body passes this door's ceiling, 1 MiB unless the door states another: `payload_too_large` (RFC 9110 section 15.5.14, https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14)."},{"const":"invalid_token","description":"RFC 6750 section 3.1's (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1): no credential, or one expired, forged or past its ceiling."},{"const":"forbidden","description":"RFC 9110 section 15.5.4's 403 (https://www.rfc-editor.org/rfc/rfc9110#section-15.5.4): your memberships do not allow this create, or a rule the door holds refuses the write (an agent's write of the card about its own membership or of a card's configuration, the self arm of a membership PATCH, another actor's effective policy, a change of one of jedger's three posts, an agent or a device at the Google doors); `param` names what was refused where one is. A Google import your memberships do not allow answers it as the `error` of a 302 to the page."},{"const":"resource_missing","description":"Stripe's (https://docs.stripe.com/error-codes#resource-missing), on RFC 9110 section 15.5.5's 404 (https://www.rfc-editor.org/rfc/rfc9110#section-15.5.5): no row has this id, the id is no UUID, or your memberships do not reach the row; a PATCH or DELETE your policy refuses is the same 404. A path this Worker does not serve is the same code, its message naming the method and the path, and so is a single-fetch request, a path ending in `.data` or a `_routes` query parameter, which an API Worker never answers, refused by the hub sdk's entry before any door runs."},{"const":"method_not_allowed","description":"RFC 9110 section 15.5.6's 405 (https://www.rfc-editor.org/rfc/rfc9110#section-15.5.6): the path does not answer this method; `Allow` lists the methods it does."},{"const":"conflict","description":"RFC 9110 section 15.5.10's 409 (https://www.rfc-editor.org/rfc/rfc9110#section-15.5.10): a JSON Merge Patch of a card's or an organization's `data` wrote nothing after the door read the row: the row changed after the read, or your policy does not admit the row as the patch would leave it."},{"const":"unique_violation","description":"Postgres's condition (SQLSTATE 23505, https://www.postgresql.org/docs/current/errcodes-appendix.html): a second row of a unique value, such as a second membership of one user in one organization, a second join of one membership and one post, an `id` already taken, or an `ietf.org:mailbox` address another post holds (the trigger `iam.posts_mailbox`)."},{"const":"foreign_key_violation","description":"Postgres's condition (SQLSTATE 23503): the row names a row that does not exist, an organization, a user, a membership or a post."},{"const":"restrict_violation","description":"Postgres's condition (SQLSTATE 23001): rows still name this row; delete them first. An organization with any event never deletes."},{"const":"check_violation","description":"Postgres's condition (SQLSTATE 23514): a membership would hold more than twenty posts, the quota trigger on `iam.membership_posts`, AWS's `LimitExceeded` (https://docs.aws.amazon.com/IAM/latest/APIReference/API_AddUserToGroup.html); or a membership would be held by a user and a device at once, the CHECK `memberships_device_id_user_id_check`; or a post's `ietf.org:mailbox` is no list of lowercase addr-specs each named once (the trigger `iam.posts_mailbox`)."},{"const":"provider_unsupported","description":"`POST /iam/v1/google` alone: this hostname binds no Google client, so the round trip to Google is not offered, a 404 for a card's fill and a 302 with `error` for an import, which also answers it where the hostname holds no `IDENTITY_REFRESH_TOKENS_CEK` (`integrations/google/client.server.ts`)."},{"const":"state_invalid","description":"`GET /iam/v1/google/callback` alone: the `state` cookie or the verifier cookie is missing, the `state` cookie does not match what Google sent back, or the state carries no act or no page."},{"const":"server_error","description":"OAuth's (RFC 6749 section 4.1.2.1): a fault on this side; the message names the error's class and its SQLSTATE alone, and `request_id` the Ray ID its whole text is logged under."},{"const":"service_unavailable","description":"RFC 9110 section 15.6.4's 503 (https://www.rfc-editor.org/rfc/rfc9110#section-15.6.4): the database could not be reached; retry."},{"const":"bad_gateway","description":"RFC 9110 section 15.6.3's 502 (https://www.rfc-editor.org/rfc/rfc9110#section-15.6.3): another jedger door this one called refused; the message names it."},{"const":"gateway_timeout","description":"RFC 9110 section 15.6.5's 504 (https://www.rfc-editor.org/rfc/rfc9110#section-15.6.5), the hub's on a `GET` or `HEAD`: the answer's headers took longer than 5 s."},{"type":"string","description":"A vendor's own code a door passes through on a refusal it relays."}]},"message":{"type":"string","description":"What was wrong and what is accepted, for a person or an agent to read. On a 500 it names nothing internal: for a thrown error its class and, when Postgres raised it, its SQLSTATE; for a 500 a door answered itself, only that its text is logged. The whole text is in the Worker's log under `request_id`."},"param":{"type":"string","description":"The parameter that was refused, its path in the request: `data.schema.org:name`, `0.object_id`, `id`."},"request_id":{"type":"string","description":"On a 500 alone: the request's Ray ID, its `CF-Ray` header (https://developers.cloudflare.com/fundamentals/reference/http-headers/#cf-ray), which the Worker's log holds the fault's whole text under. Absent when the request did not come through Cloudflare."}}}}},"iam.Uuid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"iam.DateTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"iam.Card":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/iam.Uuid"},"organization_id":{"$ref":"#/components/schemas/iam.Uuid"},"data":{"$ref":"#/components/schemas/iam.CardData"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"membership_id":{"$ref":"#/components/schemas/iam.Uuid"}},"required":["id","organization_id","data","metadata","membership_id"],"additionalProperties":false,"createOnlyProperties":["/properties/id","/properties/organization_id","/properties/membership_id"],"readOnlyProperties":["/properties/metadata"]},"iam.CardCreateRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"},"organization_id":{"$ref":"#/components/schemas/iam.Uuid"},"membership_id":{"$ref":"#/components/schemas/iam.Uuid"},"data":{"$ref":"#/components/schemas/iam.CardData"},"w3.org:audience":{"type":"string","minLength":1,"maxLength":128,"externalDocs":{"url":"https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience"}}},"required":["organization_id","membership_id","data"],"additionalProperties":false},"iam.CardData":{"type":"object","properties":{"kind":{"type":"string","enum":["individual","group","org","location","device","application"]},"language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"name":{"type":"object","properties":{"@type":{"type":"string","const":"Name"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"NameComponent"},"kind":{"type":"string","enum":["title","given","given2","surname","surname2","credential","generation","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"defaultSeparator":{"type":"string"},"full":{"type":"string"},"sortAs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"phoneticSystem":{"type":"string"},"phoneticScript":{"type":"string"}},"additionalProperties":false},"nicknames":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Nickname"},"name":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100}},"required":["name"],"additionalProperties":false}},"localizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"titles":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Title"},"name":{"type":"string"},"kind":{"type":"string","enum":["title","role"]},"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"}},"required":["name"],"additionalProperties":false}},"emails":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"EmailAddress"},"address":{"type":"string","pattern":"^[^\\s@:]+@[^\\s@]+$"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["address"],"additionalProperties":false}},"phones":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Phone"},"number":{"type":"string","pattern":"^tel:\\+\\d+$"},"features":{"type":"object","propertyNames":{"type":"string","enum":["mobile","voice","text","video","main-number","textphone","fax","pager"]},"additionalProperties":{"type":"boolean","const":true}},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["number"],"additionalProperties":false}},"links":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Link"},"kind":{"type":"string","const":"contact"},"uri":{"type":"string","format":"uri"},"mediaType":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["uri"],"additionalProperties":false}},"addresses":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"anniversaries":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Anniversary"},"kind":{"type":"string","enum":["birth","death","wedding"]},"date":{"anyOf":[{"type":"object","properties":{"@type":{"type":"string","const":"PartialDate"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"month":{"type":"integer","minimum":1,"maximum":12},"day":{"type":"integer","minimum":1,"maximum":31},"calendarScale":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Timestamp"},"utc":{"type":"string"}},"required":["utc"],"additionalProperties":false}]},"place":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"required":["date"],"additionalProperties":false}},"media":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"@type":{"type":"string","const":"Media"},"kind":{"type":"string","const":"logo"},"uri":{"type":"string","pattern":"^https:\\/\\/api\\.(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\/iam\\/v1\\/organizations\\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\/logo\\.svg$"},"mediaType":{"type":"string","const":"image/svg+xml"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["kind","uri"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Media"},"kind":{"type":"string","enum":["photo","sound"]},"uri":{"type":"string","maxLength":2048,"format":"uri"},"mediaType":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["kind","uri"],"additionalProperties":false}],"type":"object"}},"w3.org:identifier":{"type":"object","propertyNames":{"type":"string","pattern":"^(\\d{4}|[A-Z]{2}:[A-Za-z0-9]+)$"},"additionalProperties":{"type":"string","pattern":"^\\d+$"}},"ai-sdk.dev:instructions":{"type":"string","maxLength":20000,"externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}},"ai-sdk.dev:model":{"type":"string","minLength":1,"maxLength":128,"externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/provider-registry"}},"ai-sdk.dev:realtime":{"type":"string","minLength":1,"maxLength":128,"externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}},"ai-sdk.dev:evaluation":{"type":"string","minLength":1,"maxLength":128,"externalDocs":{"url":"https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text"}},"jedger.com:agent":{"deprecated":true,"description":"Dead since one front office per organization (2026-10-29): read by nobody, accepted only so a PATCH can remove it, `null`.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jedger.com:device":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:reading":{"$ref":"#/components/schemas/iam.CardReading","description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:greeting":{"type":"string","minLength":1,"maxLength":500,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:placeholder":{"type":"string","minLength":1,"maxLength":500,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:keywords/instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:keywords/none":{"type":"string","minLength":1,"maxLength":2000,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:front_office/instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:front_office/true":{"type":"string","minLength":1,"maxLength":2000,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:front_office/false":{"type":"string","minLength":1,"maxLength":2000,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:back_office/instructions":{"type":"string","minLength":1,"maxLength":2000,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:back_office/true":{"type":"string","minLength":1,"maxLength":2000,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"jedger.com:back_office/false":{"type":"string","minLength":1,"maxLength":2000,"description":"jedger's own key (jedger.com): the cards comment says what it is."},"schema.org:broker":{"deprecated":true,"description":"Dead since 2026-10-15: read by nobody, accepted only so a card still holding it can be written; never send it, and `null` removes it.","externalDocs":{"url":"https://schema.org/broker"}},"schema.org:duration/instructions":{"deprecated":true,"description":"Dead since 2026-10-15: read by nobody, accepted only so a card still holding it can be written; never send it, and `null` removes it.","externalDocs":{"url":"https://schema.org/duration"}},"schema.org:duration/PT1M":{"deprecated":true,"description":"Dead since 2026-10-15: read by nobody, accepted only so a card still holding it can be written; never send it, and `null` removes it.","externalDocs":{"url":"https://schema.org/duration"}},"schema.org:duration/PT10M":{"deprecated":true,"description":"Dead since 2026-10-15: read by nobody, accepted only so a card still holding it can be written; never send it, and `null` removes it.","externalDocs":{"url":"https://schema.org/duration"}},"schema.org:duration/PT30M":{"deprecated":true,"description":"Dead since 2026-10-15: read by nobody, accepted only so a card still holding it can be written; never send it, and `null` removes it.","externalDocs":{"url":"https://schema.org/duration"}},"jedger.com:speak/instructions":{"deprecated":true,"description":"Dead since 2026-10-15: read by nobody, accepted only so a card still holding it can be written; never send it, and `null` removes it."},"jedger.com:speak/true":{"deprecated":true,"description":"Dead since 2026-10-15: read by nobody, accepted only so a card still holding it can be written; never send it, and `null` removes it."},"jedger.com:speak/false":{"deprecated":true,"description":"Dead since 2026-10-15: read by nobody, accepted only so a card still holding it can be written; never send it, and `null` removes it."},"onlineServices":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"OnlineService"},"service":{"type":"string"},"uri":{"type":"string","format":"uri"},"user":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"additionalProperties":false}},"uid":{"type":"string","minLength":1,"maxLength":255},"organizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Organization"},"name":{"type":"string"},"units":{"minItems":1,"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"OrgUnit"},"name":{"type":"string"},"sortAs":{"type":"string"}},"required":["name"],"additionalProperties":false}},"sortAs":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}}},"additionalProperties":false}}},"additionalProperties":false,"patternProperties":{"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$":{"description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused. RFC 9553 section 1.8.1's vendor-specific property."}}},"iam.CardPatch":{"type":"object","properties":{"data":{"type":"object","propertyNames":{"anyOf":[{"enum":["kind","language","name","nicknames","localizations","titles","emails","phones","links","addresses","anniversaries","media","w3.org:identifier","ai-sdk.dev:instructions","ai-sdk.dev:model","ai-sdk.dev:realtime","ai-sdk.dev:evaluation","jedger.com:agent","jedger.com:device","jedger.com:reading","jedger.com:greeting","jedger.com:placeholder","jedger.com:keywords/instructions","jedger.com:keywords/none","jedger.com:front_office/instructions","jedger.com:front_office/true","jedger.com:front_office/false","jedger.com:back_office/instructions","jedger.com:back_office/true","jedger.com:back_office/false","schema.org:broker","schema.org:duration/instructions","schema.org:duration/PT1M","schema.org:duration/PT10M","schema.org:duration/PT30M","jedger.com:speak/instructions","jedger.com:speak/true","jedger.com:speak/false","onlineServices","uid","organizations"]},{"pattern":"^[a-z0-9-]+(?:\\.[a-z0-9-]+)+:[A-Za-z][A-Za-z0-9_]*$","description":"A key of your own under its owner's prefix, `<domain>:<name>` (`example.com:customprop`, `jedger.com:note`), any JSON value: kept as written and read by no statement. A key with no prefix that the body does not name is refused."}]},"additionalProperties":{}},"w3.org:audience":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"externalDocs":{"url":"https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audience"}}},"additionalProperties":false},"iam.CardReading":{"minItems":1,"type":"array","items":{"type":"string","enum":["qr_code","gs1.org:gtin","gs1.org:expirationDate"]}},"iam.MembershipCard":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/iam.CardData"}},"required":["data"],"additionalProperties":false},"iam.MembershipCreateRequest":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data":{"$ref":"#/components/schemas/iam.MembershipData"},"card":{"$ref":"#/components/schemas/iam.MembershipCard"}},"required":["organization_id"],"additionalProperties":false,"examples":[{"organization_id":"00000000-0000-7000-8000-000000000001","card":{"data":{"kind":"org","name":{"full":"예시 공장"},"phones":{"main":{"number":"tel:+12025550142","features":{"voice":true}}},"emails":{"main":{"address":"contact@example.com"}},"addresses":{"plant":{"countryCode":"KR","full":"경기도 예시시 예시로 1"}},"example.com:machineCount":12}}},{"organization_id":"00000000-0000-7000-8000-000000000001","card":{"data":{"kind":"individual","name":{"full":"홍길동"},"phones":{"mobile":{"number":"tel:+12025550178","features":{"mobile":true,"text":true}}},"emails":{"work":{"address":"gildong@example.org"}}}}}]},"iam.MembershipData":{"type":"object","properties":{"Version":{"type":"string","const":"2012-10-17"},"Statement":{"type":"array","items":{"type":"object","properties":{"Sid":{"type":"string"},"Effect":{"type":"string","enum":["Allow","Deny"]},"Action":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"Resource":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"Condition":{"type":"object","properties":{"StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"ForAnyValue:StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"ForAllValues:StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"Bool":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["true","false"]}},"Null":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["true","false"]}}},"additionalProperties":false}},"required":["Effect","Action","Resource"],"additionalProperties":false}}},"required":["Version","Statement"],"additionalProperties":false},"iam.MembershipPatch":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/iam.MembershipData"},"user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"device_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"uri":{"$ref":"#/components/schemas/iam.UriList"}},"additionalProperties":false},"iam.MembershipPostCreateRequest":{"type":"object","properties":{"membership_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"post_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"uri":{"$ref":"#/components/schemas/iam.UriList"}},"required":["post_id","organization_id"],"additionalProperties":false},"iam.OrganizationCreateRequest":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/iam.OrganizationData"}},"additionalProperties":false},"iam.OrganizationData":{"type":"object","properties":{"language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"name":{"type":"object","properties":{"@type":{"type":"string","const":"Name"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"NameComponent"},"kind":{"type":"string","enum":["title","given","given2","surname","surname2","credential","generation","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"defaultSeparator":{"type":"string"},"full":{"type":"string"},"sortAs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"phoneticSystem":{"type":"string"},"phoneticScript":{"type":"string"}},"additionalProperties":false},"nicknames":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Nickname"},"name":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100}},"required":["name"],"additionalProperties":false}},"localizations":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"titles":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Title"},"name":{"type":"string"},"kind":{"type":"string","enum":["title","role"]},"organizationId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"}},"required":["name"],"additionalProperties":false}},"emails":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"EmailAddress"},"address":{"type":"string","pattern":"^[^\\s@:]+@[^\\s@]+$"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["address"],"additionalProperties":false}},"phones":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Phone"},"number":{"type":"string","pattern":"^tel:\\+\\d+$"},"features":{"type":"object","propertyNames":{"type":"string","enum":["mobile","voice","text","video","main-number","textphone","fax","pager"]},"additionalProperties":{"type":"boolean","const":true}},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["number"],"additionalProperties":false}},"links":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Link"},"kind":{"type":"string","const":"contact"},"uri":{"type":"string","format":"uri"},"mediaType":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["uri"],"additionalProperties":false}},"addresses":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"anniversaries":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Anniversary"},"kind":{"type":"string","enum":["birth","death","wedding"]},"date":{"anyOf":[{"type":"object","properties":{"@type":{"type":"string","const":"PartialDate"},"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"month":{"type":"integer","minimum":1,"maximum":12},"day":{"type":"integer","minimum":1,"maximum":31},"calendarScale":{"type":"string"}},"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Timestamp"},"utc":{"type":"string"}},"required":["utc"],"additionalProperties":false}]},"place":{"type":"object","properties":{"@type":{"type":"string","const":"Address"},"components":{"type":"array","items":{"type":"object","properties":{"@type":{"type":"string","const":"AddressComponent"},"kind":{"type":"string","enum":["room","apartment","floor","building","number","name","block","subdistrict","district","locality","region","postcode","country","direction","landmark","postOfficeBox","separator"]},"value":{"type":"string"},"phonetic":{"type":"string"}},"required":["kind","value"],"additionalProperties":false}},"isOrdered":{"type":"boolean"},"countryCode":{"type":"string","minLength":2,"maxLength":2},"coordinates":{"type":"string"},"timeZone":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"full":{"type":"string"},"defaultSeparator":{"type":"string"},"pref":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}},"required":["date"],"additionalProperties":false}},"notes":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"type":"object","properties":{"@type":{"type":"string","const":"Note"},"note":{"type":"string"},"created":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"author":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["note"],"additionalProperties":false}},"media":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,255}$"},"additionalProperties":{"oneOf":[{"type":"object","properties":{"@type":{"type":"string","const":"Media"},"kind":{"type":"string","const":"logo"},"uri":{"type":"string","pattern":"^https:\\/\\/api\\.(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\/iam\\/v1\\/organizations\\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\\/logo\\.svg$"},"mediaType":{"type":"string","const":"image/svg+xml"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["kind","uri"],"additionalProperties":false},{"type":"object","properties":{"@type":{"type":"string","const":"Media"},"kind":{"type":"string","enum":["photo","sound"]},"uri":{"type":"string","maxLength":2048,"format":"uri"},"mediaType":{"type":"string"},"contexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean","const":true}},"pref":{"type":"integer","minimum":1,"maximum":100},"label":{"type":"string"}},"required":["kind","uri"],"additionalProperties":false}],"type":"object"}},"w3.org:identifier":{"type":"object","propertyNames":{"type":"string","pattern":"^(\\d{4}|[A-Z]{2}:[A-Za-z0-9]+)$"},"additionalProperties":{"type":"string","pattern":"^\\d+$"}},"kind":{"type":"string","const":"org"},"schema.org:slogan":{"type":"string","minLength":1,"externalDocs":{"url":"https://schema.org/slogan"}}},"required":["kind"],"additionalProperties":false},"iam.OrganizationFile":{"type":"string","enum":["logo.svg","logo-32x32.png","logo-180x180.png","logo-192x192.png","logo-512x512.png","favicon.ico"]},"iam.OrganizationPatch":{"type":"object","properties":{"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["data"],"additionalProperties":false},"iam.PostCreateRequest":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data":{"type":"object","properties":{"Version":{"type":"string","const":"2012-10-17"},"Statement":{"type":"array","items":{"type":"object","properties":{"Sid":{"type":"string"},"Effect":{"type":"string","enum":["Allow","Deny"]},"Action":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"Resource":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"Condition":{"type":"object","properties":{"StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"ForAnyValue:StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"ForAllValues:StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"Bool":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["true","false"]}},"Null":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["true","false"]}}},"additionalProperties":false}},"required":["Effect","Action","Resource"],"additionalProperties":false}},"schema.org:name":{"type":"string","minLength":1,"maxLength":128,"externalDocs":{"url":"https://schema.org/name"}}},"required":["Version","Statement","schema.org:name"],"additionalProperties":false},"ietf.org:mailbox":{"$ref":"#/components/schemas/iam.PostMailbox"},"keycloak.org:defaultGroup":{"$ref":"#/components/schemas/iam.PostDefaultGroup"}},"required":["organization_id","data"],"additionalProperties":false},"iam.PostData":{"type":"object","properties":{"Version":{"type":"string","const":"2012-10-17"},"Statement":{"type":"array","items":{"type":"object","properties":{"Sid":{"type":"string"},"Effect":{"type":"string","enum":["Allow","Deny"]},"Action":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"Resource":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"Condition":{"type":"object","properties":{"StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"ForAnyValue:StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"ForAllValues:StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"Bool":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["true","false"]}},"Null":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["true","false"]}}},"additionalProperties":false}},"required":["Effect","Action","Resource"],"additionalProperties":false}},"schema.org:name":{"type":"string","minLength":1,"maxLength":128,"externalDocs":{"url":"https://schema.org/name"}}},"required":["Version","Statement"],"additionalProperties":false},"iam.PostDefaultGroup":{"type":"boolean","const":true},"iam.PostMailbox":{"minItems":1,"type":"array","items":{"type":"string"}},"iam.PostPatch":{"type":"object","properties":{"data":{"type":"object","properties":{"Version":{"type":"string","const":"2012-10-17"},"Statement":{"type":"array","items":{"type":"object","properties":{"Sid":{"type":"string"},"Effect":{"type":"string","enum":["Allow","Deny"]},"Action":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"Resource":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"Condition":{"type":"object","properties":{"StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"ForAnyValue:StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"ForAllValues:StringEquals":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]}},"Bool":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["true","false"]}},"Null":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["true","false"]}}},"additionalProperties":false}},"required":["Effect","Action","Resource"],"additionalProperties":false}},"schema.org:name":{"type":"string","minLength":1,"maxLength":128,"externalDocs":{"url":"https://schema.org/name"}}},"required":["Version","Statement","schema.org:name"],"additionalProperties":false},"ietf.org:mailbox":{"anyOf":[{"$ref":"#/components/schemas/iam.PostMailbox"},{"type":"null"}]},"keycloak.org:defaultGroup":{"anyOf":[{"$ref":"#/components/schemas/iam.PostDefaultGroup"},{"type":"null"}]}},"additionalProperties":false},"iam.UriList":{"minItems":1,"type":"array","items":{"type":"string","pattern":"^mailto:[^\\s]+$"}},"iam.Event":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/iam.Uuid"},"organization_id":{"$ref":"#/components/schemas/iam.Uuid"},"type":{"type":"string"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"event_at":{"$ref":"#/components/schemas/iam.DateTime"},"created_at":{"$ref":"#/components/schemas/iam.DateTime"},"metadata":{"type":"object","properties":{"api_version":{"type":"string"},"organization_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"sub":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"act":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"error_code":{"type":"string","const":"AccessDenied"},"source_ip_address":{"type":"string"},"user_agent":{"type":"string"},"request_id":{"type":"string"},"access_key_id":{"type":"string"}},"required":["api_version","organization_id"],"additionalProperties":{}},"card_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]},"membership_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]},"membership_post_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]},"post_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]}},"required":["id","organization_id","type","data","event_at","created_at","metadata","card_id","membership_id","membership_post_id","post_id"],"additionalProperties":false},"iam.Membership":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/iam.Uuid"},"organization_id":{"$ref":"#/components/schemas/iam.Uuid"},"user_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]},"data":{"$ref":"#/components/schemas/iam.MembershipData"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"device_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]}},"required":["id","organization_id","user_id","data","metadata","device_id"],"additionalProperties":false},"iam.MembershipPost":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/iam.Uuid"},"membership_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]},"organization_id":{"$ref":"#/components/schemas/iam.Uuid"},"post_id":{"$ref":"#/components/schemas/iam.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","membership_id","organization_id","post_id","metadata"],"additionalProperties":false},"iam.Organization":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/iam.Uuid"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"data":{"$ref":"#/components/schemas/iam.OrganizationData"}},"required":["id","metadata","data"],"additionalProperties":false},"iam.Post":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/iam.Uuid"},"organization_id":{"$ref":"#/components/schemas/iam.Uuid"},"data":{"$ref":"#/components/schemas/iam.PostData"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","organization_id","data","metadata"],"additionalProperties":false},"iam.MembershipCreated":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/iam.Uuid"},"organization_id":{"$ref":"#/components/schemas/iam.Uuid"},"user_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]},"data":{"$ref":"#/components/schemas/iam.MembershipData"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"device_id":{"anyOf":[{"$ref":"#/components/schemas/iam.Uuid"},{"type":"null"}]},"card":{"anyOf":[{"$ref":"#/components/schemas/iam.Card"},{"type":"null"}]}},"required":["id","organization_id","user_id","data","metadata","device_id","card"],"additionalProperties":false}},"parameters":{},"responses":{},"securitySchemes":{"userJwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A person's or an AI agent's user JWT."},"deviceJwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A device's JWT, for an act no person called. A device buys it at `GET /artifact/v1/devices/{id}` on this origin, `{id}` the device's own id, sending the secret of one of its `artifact.service_tokens` as `Authorization: Bearer` (RFC 6750 section 2.1, https://datatracker.ietf.org/doc/html/rfc6750#section-2.1); the answer is the device's row and carries the JWT on `Authentication-Info` (RFC 7615 section 3, https://www.rfc-editor.org/rfc/rfc7615#section-3), as `token=\"<JWT>\", expires_in=<seconds>`, `expires_in=300` on both hostnames today. Send the JWT as `Authorization: Bearer` until it expires, then spend the secret again. A wrong secret or an unknown id is 401 `invalid_token`."},"serviceToken":{"type":"http","scheme":"bearer","description":"A service token's secret, never a JWT: send it as `Authorization: Bearer` to `GET /identity/v1/service_tokens/{id}` on this origin, `{id}` the token's own id, and the answer carries your user JWT on `Authentication-Info` (RFC 7615, https://www.rfc-editor.org/rfc/rfc7615), as `token=\"<JWT>\", expires_in=<seconds>`; send that JWT as `Authorization: Bearer` (the `userJwt` scheme) until it expires, then spend the secret again. A wrong secret or an unknown id is 401 `invalid_token`."},"userJwtCookie":{"type":"apiKey","in":"cookie","name":"user_jwt","description":"A browser's user JWT, set by identity at sign-in. A request that carries it and no `Authorization: Bearer`, whose JWT is undefined s old or older, is answered with a `Set-Cookie` of the JWT identity renews and `Cache-Control: private`; when its user row is gone the answer clears the cookie instead; when identity cannot renew it the answer carries neither and the JWT stands until its `exp`."}}},"servers":[{"url":"https://api.rafa.voyage"}]}