diff --git a/CHANGELOG.md b/CHANGELOG.md index 189ab6a..e352760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to `cbox-id-client` are recorded here. Earlier releases are described by their tags and commit history. +## [Unreleased] + +Cbox ID v3, additively. A client that sets nothing new calls exactly what 0.12.0 called. + +### Added + +- `api_url` on every management client (`EnvironmentClient(api_url="https://api.cboxid.com", …)`), in place of `base_url`: the same methods call Cbox ID's `/v1` API. Each operation carries its `/v1` route (`OperationSpec.v1`, a `V1Route`), generated from the vendored `openapi/openapi.json`; parents the `/v1` route takes in the query or the body are moved there. The `/v1` shapes (unwrapped objects, the `{object: "list", …}` envelope, RFC 9457 problems, `object: "approval"` holds) come back as the same `ApiResponse`, `CboxIdApiError` and approval flow. `platform.workspaces.create` and `.set_status` have no `/v1` route and are refused on `api_url`. +- `CboxIdConfig.api_url`: the manifest push goes to `{api_url}/v1/app-manifests` and Pipes leases to `{api_url}/v1/pipe-leases` (the provider in the body). `PipesClient(…, api_url=…)` for a client built by hand. +- `OrganizationClient`: `WorkspaceClient` under Cbox ID's name for it, with `client.organization` as `client.workspace`. Takes `cbid_org_…` keys. +- `raw_id()`, `same_id()` and `is_prefixed_id()` for ids that arrive as `org_01J9Z…` or raw. +- `current_event_name()`, `legacy_event_name()`, `event_name_aliases()` and `same_event()` for event types under their old and their `id.*` names (`user.login` is `id.user.signed_in`). + +### Changed + +- `check_permissions()` accepts a decision whose subject or organization comes back as a prefixed id for the raw one asked. +- An error body's RFC 9457 `detail` (or `title`) is used as the message when it carries no `message`, for management calls and Pipes leases. + ## [0.12.0] - 2026-11-07 ### Upgrade diff --git a/README.md b/README.md index ae9c7bf..5663f47 100644 --- a/README.md +++ b/README.md @@ -440,6 +440,29 @@ Switching scheme keeps the secret: a hex Cbox secret is used as `whsec_` + base6 and both forms verify here. Update the receiver before you switch the endpoint (`env.webhooks.signature_scheme.change(id, {"signature_scheme": "standard_webhooks"})`). +### Event names and ids + +Cbox ID is moving its event types to `id.*` names: `organization.member_added` becomes +`id.organization.member_added`, and `user.login` becomes `id.user.signed_in`. For a while a +delivery can carry either, so compare names with `same_event()` rather than `==`, or key +your handlers by one form: + +```python +from cbox_id import legacy_event_name, raw_id, same_event + +event = json.loads(raw_body) + +if same_event(event["type"], "organization.member_added"): + ... + +handler = HANDLERS.get(legacy_event_name(event["type"])) # keyed by today's names +``` + +Object ids are moving to prefixed public ids (`org_01J9Z…`, `usr_01J9Z…`) in the API and +webhooks. Token claims (`sub`, `org`) keep the raw id. `raw_id("org_01J9Z…")` gives the raw +id your mirror is keyed on, and `same_id(a, b)` says whether two ids name the same object in +either spelling. Only `_` is unwrapped; any other id is compared exactly. + ## Management API `cbox_id.management` is a typed client for Cbox ID's management planes. It is generated from @@ -450,7 +473,7 @@ credential. | Client | Plane | Credential | `base_url` | | --- | --- | --- | --- | | `EnvironmentClient` | One environment's tenancy: organizations, users, apps, roles, SSO, audit logs… | `cbid_env_…` key, or a delegated access token | The environment's own host, or the platform root with `environment` | -| `WorkspaceClient` | The workspace above its environments: projects, environments, team, keys | `cbid_ws_…` key, or a person's root token | `https://api.cboxid.com` (default) | +| `OrganizationClient` (`WorkspaceClient`) | The organization above its environments: projects, environments, team, keys | `cbid_org_…` or `cbid_ws_…` key, or a person's root token | `https://api.cboxid.com` (default) | | `PlatformClient` | The deployment itself, for operators | Delegated operator token only | `https://api.cboxid.com` (default) | | `AccountClient` | A person's own account | Delegated token only | The environment's own host | @@ -464,6 +487,39 @@ editor check the keys. The client is synchronous, on `httpx`, like the rest of this package. +### The /v1 API (`api_url`) + +Cbox ID now serves every plane on one host, `https://api.cboxid.com/v1`, and the credential +decides where a call acts. Pass `api_url` in place of `base_url` to use it: + +```python +from cbox_id.management import EnvironmentClient, OrganizationClient + +env = EnvironmentClient(api_url="https://api.cboxid.com", api_key=os.environ["CBOX_ID_ENV_KEY"]) +org = OrganizationClient(api_url="https://api.cboxid.com", api_key=os.environ["CBOX_ID_ORG_KEY"]) +``` + +The methods do not change. Each one calls its `/v1` route: a child is addressed directly +(`env.members.remove(org_id, user_id)` is `DELETE /v1/organization-memberships/{user_id} +?organization_id=…`), and the client moves the parent into the query or the body for you. +The `/v1` shapes come back the way the old ones did: an object is not wrapped, so `data` is +the object; a list's `data` is its items and `meta` holds `has_more` and `next_cursor`, which +`list_all()` follows; an RFC 9457 problem raises the same `CboxIdApiError`, with its `detail` +as the message. `request(method, path)` takes a path relative to `/v1`. The two +`platform.workspaces.*` actions have no `/v1` route and raise `ConfigurationError` on a +client given `api_url`. + +Without `api_url` every client calls `{host}/api/v1` exactly as before; Cbox ID keeps +answering there, with `Deprecation` and `Sunset` headers, until its callers have moved. + +`CboxIdConfig(api_url="https://api.cboxid.com")` does the same for the calls `CboxIdClient` +makes itself: the manifest push goes to `/v1/app-manifests` and Pipes leases to +`/v1/pipe-leases`. Sign-in and every `/oauth/*` call stay on the issuer. + +Cbox ID calls the customer account an organization. `OrganizationClient` is +`WorkspaceClient` under that name (`org.organization.get()` is `org.workspace.get()`), and +takes a `cbid_org_…` key; `cbid_ws_…` keys keep working. + ### Create an app and rotate its secret ```python @@ -695,7 +751,9 @@ The specs are vendored in `openapi/`. `python -m scripts.generate_management` (w extra installed) regenerates `src/cbox_id/management/generated/` from them, and `python -m scripts.generate_management --fetch environment=https://acme.cboxid.com` (or `workspace=`, `platform=`, `account=`, `all=`) refreshes a vendored spec from a running server -first. `--check` exits non-zero when the generated code is stale, and the test suite fails +first. `openapi/openapi.json` is the `/v1` document (`--fetch v1=https://api.cboxid.com`); the +generator finds each operation's `/v1` route there by its action name and writes it into the +operation table (`ENVIRONMENT_OPERATIONS["apps.get"].v1`). `--check` exits non-zero when the generated code is stale, and the test suite fails when the generated code and the vendored specs disagree. ## Security & scope diff --git a/openapi/openapi.json b/openapi/openapi.json new file mode 100644 index 0000000..bed23be --- /dev/null +++ b/openapi/openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"Cbox ID API","version":"1.0.0","description":"Every Cbox ID management plane on one host: `https://api.cboxid.com/v1`.\n\n**The credential decides where a request acts, never the host.**\n\n- An environment key (`Bearer cbid_env_…`) acts in the environment it was minted in.\n- An access token acts in the environment that issued it (`iss`). A token for the platform root acts for its person: the organization they are on, their own account (`/v1/me`), and — for an operator — the deployment (`/v1/admin`). To act inside one environment of the organization, name it in `Cbox-Environment` (its id or slug).\n- An organization key (`Bearer cbid_org_…`) acts on its organization: `/v1/organization`, `/v1/projects`, `/v1/environments`, `/v1/members`, `/v1/invitations`, `/v1/organization-keys`.\n\nA token is accepted for the audience `https://api.cboxid.com` or `https://app.cboxid.com/mcp`, and, during the transition, an issuer's own `{issuer}/mcp`.\n\n**Shapes.** A resource is the object itself, with `object` naming what it is. A list is `{\"object\": \"list\", \"data\": […], \"has_more\": …, \"next_cursor\": …}`; pass `next_cursor` as `after` for the next page. A failure is an RFC 9457 problem (`application/problem+json`) whose `error` is a stable code and whose `type` links to its explanation; a validation failure adds `errors`, keyed by field. An action that needs a person's approval answers `202` with the approval it waits for (`object: \"approval\"`) and its `poll_url`.\n\n**A child is addressed directly.** `/v1/organization-memberships/{id}` is a member of an organization; the organization is named in the query (`organization_id`). The same holds for invitations, role assignments, portal links and the other children listed below.\n\n**The old paths.** `https://{environment}.cboxid.com/api/v1/…` keeps answering, with `Deprecation` and `Sunset` headers, until its callers have moved."},"servers":[{"url":"https://api.cboxid.com","description":"Cbox ID"}],"tags":[{"name":"Environment › Governance"},{"name":"Environment › Approvals"},{"name":"Environment › API keys"},{"name":"Environment › APIs"},{"name":"Environment › App catalog"},{"name":"Environment › Applications"},{"name":"Environment › Audit log"},{"name":"Environment › App audit logs"},{"name":"Environment › Devices"},{"name":"Environment › Branding"},{"name":"Environment › Directory Sync"},{"name":"Environment › Domains"},{"name":"Environment › Events"},{"name":"Environment › Feature flags"},{"name":"Environment › Fine-grained authorization"},{"name":"Environment › Publishable keys"},{"name":"Environment › Hooks"},{"name":"Environment › Secret keys"},{"name":"Environment › Legacy login"},{"name":"Environment › Log streams"},{"name":"Environment › Onboarding"},{"name":"Environment › Organizations"},{"name":"Environment › Invitations"},{"name":"Environment › Members"},{"name":"Environment › Roles"},{"name":"Environment › Admin Portal"},{"name":"Environment › Pipes"},{"name":"Environment › Outbound provisioning"},{"name":"Environment › Radar"},{"name":"Environment › SAML apps"},{"name":"Environment › General"},{"name":"Environment › Sign-in"},{"name":"Environment › Enterprise SSO"},{"name":"Environment › Support sessions"},{"name":"Environment › Token vault"},{"name":"Environment › User properties"},{"name":"Environment › Users"},{"name":"Environment › Token Vault"},{"name":"Environment › Webhooks"},{"name":"Apps › General"},{"name":"Account › Approvals"},{"name":"Account › Applications"},{"name":"Account › App catalog"},{"name":"Account › Devices"},{"name":"Account › Profile"},{"name":"Account › Sign-in methods"},{"name":"Account › API keys"},{"name":"Account › Organizations"},{"name":"Account › Connected services"},{"name":"Account › Service waitlists"},{"name":"Account › Sessions"},{"name":"Organization › Organization"},{"name":"Organization › Approvals"},{"name":"Organization › Billing"},{"name":"Organization › Environments"},{"name":"Organization › Keys"},{"name":"Organization › Team"},{"name":"Organization › Projects"},{"name":"Admin › Approvals"},{"name":"Admin › Environments"},{"name":"Admin › Organizations"},{"name":"Admin › Operators"}],"x-tagGroups":[{"name":"Environment","tags":["Environment › Governance","Environment › Approvals","Environment › API keys","Environment › APIs","Environment › App catalog","Environment › Applications","Environment › Audit log","Environment › App audit logs","Environment › Devices","Environment › Branding","Environment › Directory Sync","Environment › Domains","Environment › Events","Environment › Feature flags","Environment › Fine-grained authorization","Environment › Publishable keys","Environment › Hooks","Environment › Secret keys","Environment › Legacy login","Environment › Log streams","Environment › Onboarding","Environment › Organizations","Environment › Invitations","Environment › Members","Environment › Roles","Environment › Admin Portal","Environment › Pipes","Environment › Outbound provisioning","Environment › Radar","Environment › SAML apps","Environment › General","Environment › Sign-in","Environment › Enterprise SSO","Environment › Support sessions","Environment › Token vault","Environment › User properties","Environment › Users","Environment › Token Vault","Environment › Webhooks"]},{"name":"Apps","tags":["Apps › General"]},{"name":"Account","tags":["Account › Approvals","Account › Applications","Account › App catalog","Account › Devices","Account › Profile","Account › Sign-in methods","Account › API keys","Account › Organizations","Account › Connected services","Account › Service waitlists","Account › Sessions"]},{"name":"Organization","tags":["Organization › Organization","Organization › Approvals","Organization › Billing","Organization › Environments","Organization › Keys","Organization › Team","Organization › Projects"]},{"name":"Admin","tags":["Admin › Approvals","Admin › Environments","Admin › Organizations","Admin › Operators"]}],"paths":{"/v1/access-review-items/{id}/decide":{"post":{"tags":["Environment › Governance"],"summary":"Certify or revoke one item of an open access review. Revokes are applied when the review closes.","description":"Requires scope `governance:write`. Danger: write.","operationId":"environment_access_reviews_items_decide","x-action":"access_reviews.items.decide","x-scope":"governance:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"required":true,"schema":{"type":"string","description":"The review's id."},"name":"access_review_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The item's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","description":"certified keeps the access; revoked takes it away when the review closes.","enum":["certified","revoked"]},"note":{"type":["string","null"],"description":"Why, for whoever audits the review.","maxLength":1000},"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},"required":["decision"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccessReviewItem"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/access-reviews":{"get":{"tags":["Environment › Governance"],"summary":"List access reviews (certification campaigns), open and closed, optionally those covering one organization.","description":"Requires scope `governance:read`. Danger: read.","operationId":"environment_access_reviews_list","x-action":"access_reviews.list","x-scope":"governance:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only reviews covering this organization: its own and the staff reviews.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccessReview"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Governance"],"summary":"Open an access review of one organization's roles and memberships — or of staff roles — for someone to certify or revoke.","description":"Requires scope `governance:write`. Danger: write.","operationId":"environment_access_reviews_create","x-action":"access_reviews.create","x-scope":"governance:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"What the review is: \"Q3 finance access\".","maxLength":190},"covers":{"type":"string","description":"organization (default): one organization's access, named by organization_id. staff: every environment-wide staff grant.","enum":["organization","staff"]},"organization_id":{"type":["string","null"],"description":"The organization to review. Required unless covers is staff.","maxLength":64},"due_in_days":{"type":"integer","description":"Days until it is due. Default 7.","minimum":1,"maximum":365}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccessReview"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/access-reviews/{id}":{"get":{"tags":["Environment › Governance"],"summary":"Read one access review: its status, due date, pending-item policy and item count.","description":"Requires scope `governance:read`. Danger: read.","operationId":"environment_access_reviews_get","x-action":"access_reviews.get","x-scope":"governance:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The review's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccessReview"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/access-reviews/{id}/close":{"post":{"tags":["Environment › Governance"],"summary":"Close an access review and apply it: every revoke is carried out, and undecided items get the review's pending policy (revoke by default).","description":"Requires scope `governance:write`. Danger: destructive.","operationId":"environment_access_reviews_close","x-action":"access_reviews.close","x-scope":"governance:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The review's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AccessReview"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/access-reviews/{id}/items":{"get":{"tags":["Environment › Governance"],"summary":"List the items an access review asks someone to certify or revoke: who holds what, and the decision on each.","description":"Requires scope `governance:read`. Danger: read.","operationId":"environment_access_reviews_items_list","x-action":"access_reviews.items.list","x-scope":"governance:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The review's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccessReviewItem"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/admin/approvals/{id}":{"get":{"tags":["Admin › Approvals"],"summary":"Where an approval you asked for stands","description":"The `poll_url` of a `202 approval_required`: an approval this token raised, and only those — another token's id is a 404. `status` is `pending`, `approved`, `denied`, `expired` or `consumed`.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","approved","denied","expired","consumed"]}}},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"401":{"$ref":"#/components/responses/AdminUnauthorized"},"404":{"$ref":"#/components/responses/AdminNotFound"},"429":{"$ref":"#/components/responses/AdminTooManyRequests"}}}},"/v1/admin/environments":{"post":{"tags":["Admin › Environments"],"summary":"Create an environment on the deployment, with its own signing key. A domain is verified separately, by DNS.","description":"Requires scope `operator:environments:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.","operationId":"admin_admin_environments_create","x-action":"admin.environments.create","x-scope":"operator:environments:write","x-scope-aliases":[],"x-danger":"critical","x-action-aliases":["platform.environments.create"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AdminCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":190},"domain":{"type":["string","null"],"description":"The domain it will serve on, once verified by DNS. Checked to be free; not written yet.","maxLength":190}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PlatformEnvironment"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AdminApprovalRequired"},"401":{"$ref":"#/components/responses/AdminUnauthorized"},"403":{"$ref":"#/components/responses/AdminForbidden"},"409":{"$ref":"#/components/responses/AdminConflict"},"422":{"$ref":"#/components/responses/AdminUnprocessableEntity"},"429":{"$ref":"#/components/responses/AdminTooManyRequests"}}}},"/v1/admin/environments/{id}/provision":{"post":{"tags":["Admin › Environments"],"summary":"Bootstrap an environment with its first organization and an owner administrator, so people can sign in to it.","description":"Requires scope `operator:environments:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.","operationId":"admin_admin_environments_provision","x-action":"admin.environments.provision","x-scope":"operator:environments:write","x-scope-aliases":[],"x-danger":"critical","x-action-aliases":["platform.environments.provision"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AdminCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_name":{"type":"string","maxLength":190},"admin_name":{"type":"string","maxLength":190},"admin_email":{"type":"string","format":"email","maxLength":190},"admin_password":{"type":"string","description":"Write-only. Must meet the environment's own password policy.","maxLength":200}},"required":["organization_name","admin_name","admin_email","admin_password"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ProvisionedEnvironment"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AdminApprovalRequired"},"401":{"$ref":"#/components/responses/AdminUnauthorized"},"403":{"$ref":"#/components/responses/AdminForbidden"},"404":{"$ref":"#/components/responses/AdminNotFound"},"409":{"$ref":"#/components/responses/AdminConflict"},"422":{"$ref":"#/components/responses/AdminUnprocessableEntity"},"429":{"$ref":"#/components/responses/AdminTooManyRequests"}}}},"/v1/admin/operators":{"post":{"tags":["Admin › Operators"],"summary":"Add a platform operator: a person with authority over the whole deployment.","description":"Requires scope `operator:operators:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.","operationId":"admin_admin_operators_create","x-action":"admin.operators.create","x-scope":"operator:operators:write","x-scope-aliases":[],"x-danger":"critical","x-action-aliases":["platform.operators.create"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AdminCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":190},"email":{"type":"string","format":"email","maxLength":190},"password":{"type":"string","description":"Write-only. At least 12 characters, and not one known from a breach.","minLength":12,"maxLength":200}},"required":["name","email","password"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PlatformOperator"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AdminApprovalRequired"},"401":{"$ref":"#/components/responses/AdminUnauthorized"},"403":{"$ref":"#/components/responses/AdminForbidden"},"409":{"$ref":"#/components/responses/AdminConflict"},"422":{"$ref":"#/components/responses/AdminUnprocessableEntity"},"429":{"$ref":"#/components/responses/AdminTooManyRequests"}}}},"/v1/admin/operators/{id}":{"patch":{"tags":["Admin › Operators"],"summary":"Suspend a platform operator, or reactivate one. Never yourself, and never the last active operator.","description":"Requires scope `operator:operators:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.","operationId":"admin_admin_operators_set_status","x-action":"admin.operators.set_status","x-scope":"operator:operators:write","x-scope-aliases":[],"x-danger":"critical","x-action-aliases":["platform.operators.set_status"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AdminCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","suspended"]}},"required":["status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PlatformOperator"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AdminApprovalRequired"},"401":{"$ref":"#/components/responses/AdminUnauthorized"},"403":{"$ref":"#/components/responses/AdminForbidden"},"404":{"$ref":"#/components/responses/AdminNotFound"},"409":{"$ref":"#/components/responses/AdminConflict"},"422":{"$ref":"#/components/responses/AdminUnprocessableEntity"},"429":{"$ref":"#/components/responses/AdminTooManyRequests"}}}},"/v1/admin/organizations":{"post":{"tags":["Admin › Organizations"],"summary":"Create an organization inside an environment, optionally under a parent organization of the same environment.","description":"Requires scope `operator:organizations:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.\n\nCreate an organization with its owner, first project and first environment; the owner is emailed a link to set their password.: Requires scope `operator:workspaces:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.","operationId":"admin_admin_tenant_organizations_create","x-action":"admin.tenant_organizations.create","x-scope":"operator:organizations:write","x-scope-aliases":[],"x-danger":"critical","x-action-aliases":["platform.organizations.create"],"parameters":[{"required":true,"schema":{"type":"string"},"name":"environment_id","in":"query"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AdminCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The organization's name — usually the company it belongs to.","minLength":2,"maxLength":120},"type":{"type":"string","enum":["customer","reseller"]},"parent_id":{"type":["string","null"],"description":"An organization of the same environment to create it under."},"owner_email":{"type":"string","description":"The owner. An address that already has an account keeps it; the organization is added to it.","format":"email","maxLength":255},"owner_name":{"type":"string","minLength":2,"maxLength":120},"environment_limit":{"type":"integer","description":"The first project's environment allowance: 1, 2, 3, 5, 10 or 25.","minimum":1,"maximum":25}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PlatformOrganization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AdminApprovalRequired"},"401":{"$ref":"#/components/responses/AdminUnauthorized"},"403":{"$ref":"#/components/responses/AdminForbidden"},"404":{"$ref":"#/components/responses/AdminNotFound"},"409":{"$ref":"#/components/responses/AdminConflict"},"422":{"$ref":"#/components/responses/AdminUnprocessableEntity"},"429":{"$ref":"#/components/responses/AdminTooManyRequests"}},"security":[]}},"/v1/admin/organizations/{id}":{"patch":{"tags":["Admin › Organizations"],"summary":"Move an organization under another organization of the same environment, or to the top of its hierarchy.","description":"Requires scope `operator:organizations:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.\n\nSuspend an organization inside an environment (its members can no longer sign in to it) or reactivate it.: Requires scope `operator:organizations:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.\n\nSuspend an organization (its people can no longer sign in, its environments stop serving) or reactivate it.: Requires scope `operator:workspaces:write` on an access token delegated by an active platform operator. No management key is accepted. Danger: critical.","operationId":"admin_admin_tenant_organizations_move","x-action":"admin.tenant_organizations.move","x-scope":"operator:organizations:write","x-scope-aliases":[],"x-danger":"critical","x-action-aliases":["platform.organizations.move"],"parameters":[{"required":true,"schema":{"type":"string"},"name":"environment_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AdminCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parent_id":{"type":["string","null"],"description":"The new parent, of the same environment; null for the top of the hierarchy."},"status":{"type":"string","enum":["active","suspended"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PlatformOrganization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AdminApprovalRequired"},"401":{"$ref":"#/components/responses/AdminUnauthorized"},"403":{"$ref":"#/components/responses/AdminForbidden"},"404":{"$ref":"#/components/responses/AdminNotFound"},"409":{"$ref":"#/components/responses/AdminConflict"},"422":{"$ref":"#/components/responses/AdminUnprocessableEntity"},"429":{"$ref":"#/components/responses/AdminTooManyRequests"}},"security":[]}},"/v1/api-keys":{"get":{"operationId":"environment_api_keys_list","x-action":"api_keys.list","tags":["Environment › API keys"],"summary":"List the API keys an organization's members created for your apps","description":"Requires scope `api_keys:read`. Revoked and expired keys are included, marked by\n`status`. Never the key itself. Narrow to one app with `?client_id=`.\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"name":"client_id","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"api_keys:read","x-scope-aliases":[],"x-danger":"read"}},"/v1/api-keys/{id}":{"delete":{"operationId":"environment_api_keys_revoke","x-action":"api_keys.revoke","tags":["Environment › API keys"],"summary":"Revoke a member API key","description":"Requires scope `api_keys:write`. The key stops verifying at once. Idempotent — an\nalready-revoked key is a 204 too. Recorded as `api_key.revoked`, with this\nmanagement key as the actor.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Revoked."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"api_keys:write","x-scope-aliases":[],"x-danger":"destructive"}},"/v1/api-scopes/{id}":{"put":{"tags":["Environment › APIs"],"summary":"Add a scope to an API, or change the description or tenant access of one it owns.","description":"Requires scope `apis:write`. Danger: write.","operationId":"environment_apis_scopes_define","x-action":"apis.scopes.define","x-scope":"apis:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"required":true,"schema":{"type":"string","description":"The API id."},"name":"api_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The scope key: `tax:assess`.","maxLength":128}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":255},"tenant_requestable":{"type":"boolean","description":"Whether organizations' own apps may request it. Default true."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Api"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › APIs"],"summary":"Remove a scope from an API. Apps holding it keep it as a plain scope that no longer reaches the API.","description":"Requires scope `apis:write`. Danger: destructive.","operationId":"environment_apis_scopes_remove","x-action":"apis.scopes.remove","x-scope":"apis:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"required":true,"schema":{"type":"string","description":"The API id."},"name":"api_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The scope key.","maxLength":128}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apis":{"get":{"tags":["Environment › APIs"],"summary":"List registered APIs","description":"Requires scope `apis:read`.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Api"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-action":"apis.list","x-scope":"apis:read","x-scope-aliases":[],"x-danger":"read"},"post":{"tags":["Environment › APIs"],"summary":"Register an API and its scopes","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"description":"Requires scope `apis:write`. Registering an API is the environment's act; no tenant\nsurface can. `identifier` is an absolute URI (RFC 8707) and becomes the token's\n`aud`. Scope keys are unique across the environment. `client_id` links the app whose\nroles and permissions the API enforces, and must have the API's owner.\n`organization_id` makes the API one organization's; left out, the environment owns\nit. Refusals are `422 invalid_api` with the reason.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identifier","name"],"properties":{"identifier":{"type":"string","format":"uri","maxLength":255},"name":{"type":"string","maxLength":120},"organization_id":{"type":["string","null"]},"client_id":{"type":["string","null"]},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ApiScope"}}}}}}},"responses":{"201":{"description":"Registered.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Api"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-action":"apis.create","x-scope":"apis:write","x-scope-aliases":[],"x-danger":"write"}},"/v1/apis/{id}":{"get":{"tags":["Environment › APIs"],"summary":"Get an API","description":"Requires scope `apis:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Api"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-action":"apis.get","x-scope":"apis:read","x-scope-aliases":[],"x-danger":"read"},"patch":{"tags":["Environment › APIs"],"summary":"Change an API","description":"Requires scope `apis:write`. Any of: `name`; `client_id` (null unlinks the app);\n`scopes`, which is the **complete** set afterwards — scopes named are added or\nupdated, scopes left out are removed. All or nothing. The identifier never changes:\nregister a new API instead.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"client_id":{"type":["string","null"]},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ApiScope"}}}}}}},"responses":{"200":{"description":"The API after the change.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Api"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-action":"apis.update","x-scope":"apis:write","x-scope-aliases":[],"x-danger":"write"},"delete":{"tags":["Environment › APIs"],"summary":"Delete an API and its scopes","description":"Requires scope `apis:write`. Tokens already minted for it keep their `aud` until they\nexpire; apps holding its scope keys keep them as plain scopes.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"202":{"$ref":"#/components/responses/ApprovalRequired"},"204":{"description":"Deleted."},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-action":"apis.delete","x-scope":"apis:write","x-scope-aliases":[],"x-danger":"destructive"}},"/v1/app-catalog":{"get":{"tags":["Environment › App catalog"],"summary":"List catalog apps, including drafts and visibility settings.","description":"Requires scope `app_catalog:read`. Danger: read.","operationId":"environment_app_catalog_list","x-action":"app_catalog.list","x-scope":"app_catalog:read","x-danger":"read","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","required":["key","name","description","launch_url","icon_url","icon_dark_url","position","version"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"launch_url":{"type":"string","format":"uri"},"icon_url":{"type":["string","null"]},"icon_dark_url":{"type":["string","null"],"description":"Icon for dark surfaces. Null when the app has no dark icon; use icon_url in both themes."},"purpose":{"type":["string","null"],"description":"One line under the name in the app switcher."},"hue":{"type":["string","null"],"description":"The cbox-ui hue token the tile is drawn in, such as violet or amber."},"admission_url":{"type":["string","null"],"format":"uri","description":"Where a person who does not have the app asks for it."},"promote_when_unavailable":{"type":"boolean"},"position":{"type":"integer"},"version":{"type":"integer"}}}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope-aliases":[]}},"/v1/app-catalog/for-user":{"get":{"tags":["Environment › App catalog"],"summary":"List the published apps one person sees in one of their organizations, in catalog order. For an app's backend, with its own client-credentials token.","description":"Requires scope `app_catalog:resolve`. Danger: read.\n\nWhat an app's backend asks to draw its app switcher for a person it has already signed\nin — with the app's OWN client-credentials token (`grant_type=client_credentials`,\n`scope=app_catalog:resolve`), so the switcher never needs the person's\n`account:apps:read` grant, a reconnect or a sign-in hop. An administrator grants the\nscope to the app in the console.\n\nThe items, their order and the envelope are exactly those of `GET /api/v1/me/apps` with\nthe same `organization_id`. A person who does not exist, is not active, or is not an\nactive member of the organization is the same `404 not_found`.\n\nA hot read: no audit entry is written. Cache it for `meta.refresh_after` seconds, and\ncompare `meta.revision` to tell whether anything changed.\n","operationId":"environment_app_catalog_for_user","x-action":"app_catalog.for_user","x-scope":"app_catalog:resolve","x-danger":"read","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","description":"The person, by their Cbox ID user id.","maxLength":64}},{"name":"organization_id","in":"query","required":true,"schema":{"type":"string","description":"The organization they are working in, which they must be an active member of.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]},{"AppAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","required":["key","name","description","launch_url","icon_url","icon_dark_url","position","version"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"launch_url":{"type":"string","format":"uri"},"icon_url":{"type":["string","null"]},"icon_dark_url":{"type":["string","null"],"description":"Icon for dark surfaces. Null when the app has no dark icon; use icon_url in both themes."},"purpose":{"type":["string","null"],"description":"One line under the name in the app switcher."},"hue":{"type":["string","null"],"description":"The cbox-ui hue token the tile is drawn in, such as violet or amber."},"available":{"type":"boolean","description":"Always true here; the apps listed in meta.unavailable carry false."},"position":{"type":"integer"},"version":{"type":"integer"}}}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope-aliases":[]}},"/v1/app-catalog/{id}":{"get":{"tags":["Environment › App catalog"],"summary":"Read a catalog app and its publication settings.","description":"Requires scope `app_catalog:read`. Danger: read.","operationId":"environment_app_catalog_show","x-action":"app_catalog.show","x-scope":"app_catalog:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Environment › App catalog"],"summary":"Create or replace a catalog app, its light and dark icons and visibility. Version zero creates; a stale version conflicts.","description":"Requires scope `app_catalog:write`. Danger: write.","operationId":"environment_app_catalog_save","x-action":"app_catalog.save","x-scope":"app_catalog:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":0},"name":{"type":"string","maxLength":120},"description":{"type":["string","null"],"maxLength":300},"launch_url":{"type":"string","description":"Explicit HTTPS entry point. Never inferred from OAuth redirects.","maxLength":2048},"enabled":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":10000},"audience":{"type":"string","enum":["everyone","organizations","users"]},"organization_ids":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":64}},"user_ids":{"type":"array","maxItems":100,"items":{"type":"string","maxLength":64}},"client_ids":{"type":"array","description":"Environment-wide OAuth client ids associated with this app. Does not grant access.","maxItems":100,"items":{"type":"string","maxLength":190}},"required_feature":{"type":["string","null"],"description":"Optional feature-flag key. Hidden when off for this person and organization.","maxLength":64},"icon":{"type":["string","null"],"description":"PNG, JPEG or WebP data URI, up to 128 KiB and 512 pixels. Omit to retain; null clears. SVG and remote URLs are refused.","maxLength":180000},"purpose":{"type":["string","null"],"description":"One line the app switcher shows under the name. Omit to retain; null clears.","maxLength":60},"hue":{"type":["string","null"],"description":"The cbox-ui hue the tile is drawn in, light and dark. Omit to retain; null clears.","enum":["red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","slate","stone"]},"admission_url":{"type":["string","null"],"description":"Public HTTPS page where a person who does not have the app asks for it (signup or waitlist). Omit to retain; null clears.","maxLength":2048},"promote_when_unavailable":{"type":"boolean","description":"List the app under \"not yet\" for people who cannot open it, when it has an admission URL. Never for a users audience. Defaults to true; omit to retain."},"icon_dark":{"type":["string","null"],"description":"Icon for dark surfaces, same rules as icon. Omit to retain; null clears. Without it, clients show icon in both themes.","maxLength":180000}},"required":["version","name","launch_url","enabled","position","audience"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › App catalog"],"summary":"Remove a catalog app without deleting its OAuth clients or user data.","description":"Requires scope `app_catalog:write`. Danger: destructive.","operationId":"environment_app_catalog_delete","x-action":"app_catalog.delete","x-scope":"app_catalog:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1}},"required":["version"]}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/app-manifests":{"post":{"operationId":"apps_publishAppManifest","summary":"Synchronize the authenticated app’s authorization definitions","description":"Requires a client-credentials token. The token client owns this catalog. Publication does not assign roles; existing role definition changes are staged for explicit activation. Removed keys remain available for assignment review. The receipt binds the client and canonical manifest checksum, including unchanged and empty publications.","security":[{"AppAccessToken":[]}],"x-required-scope":"apps.manifest","responses":{"200":{"description":"Success. Responses must not be cached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManifestReceipt"}}}},"401":{"description":"Missing or invalid token, audience or proof.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope or insufficient current authority.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested resource is unavailable in this scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit exceeded.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Manifest"}}}},"parameters":[],"tags":["Apps › General"]}},"/v1/app-secrets/{id}":{"delete":{"tags":["Environment › Applications"],"summary":"Revoke one of an app's client secrets immediately. Never its last live secret — rotate that instead.","description":"Requires scope `apps:write`. Danger: critical.","operationId":"environment_apps_secrets_revoke","x-action":"apps.secrets.revoke","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."},"name":"app_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The secret's id, from `GET /apps/{id}/secrets`.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/appearance":{"get":{"tags":["Environment › Branding"],"summary":"Read the hosted sign-in theme: the environment default, or one organization's own.","description":"Requires scope `branding:read`. Danger: read.","operationId":"environment_branding_appearance_get","x-action":"branding.appearance.get","x-scope":"branding:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"Read this organization's theme. Left out, the environment default.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Appearance"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Environment › Branding"],"summary":"Set the hosted sign-in theme (preset, colours, corners, type, uploaded logo and favicon) for the environment default or one organization.","description":"Requires scope `branding:write`. Danger: write.","operationId":"environment_branding_appearance_set","x-action":"branding.appearance.set","x-scope":"branding:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Theme this organization. Left out, the environment default.","maxLength":64},"theme":{"type":"object","description":"The theme. Both modes must be readable: text needs 4.5:1 against the background, muted text 3:1.","properties":{"preset":{"type":"string","description":"A preset id: cbox, midnight, minimal, warm, contrast.","maxLength":64},"radius":{"type":"string","description":"Corner radius: 0rem, 0.25rem, 0.375rem, 0.5rem, 0.75rem, 1rem.","maxLength":32},"font":{"type":"string","description":"Type family: system, inter, geometric, rounded, serif.","maxLength":32},"light":{"type":"object","description":"Colours as #rrggbb. One left out takes the preset's.","properties":{"primary":{"type":"string","maxLength":32},"background":{"type":"string","maxLength":32},"foreground":{"type":"string","maxLength":32},"muted":{"type":"string","maxLength":32}}},"dark":{"type":"object","description":"Colours as #rrggbb. One left out takes the preset's.","properties":{"primary":{"type":"string","maxLength":32},"background":{"type":"string","maxLength":32},"foreground":{"type":"string","maxLength":32},"muted":{"type":"string","maxLength":32}}}}},"logo":{"type":["string","null"],"description":"The logo as a base64 data: URI (data:image/png;base64,…): PNG, JPEG or WebP, at most 1024 KB and 4096px on the longest side. SVG and remote URLs are refused. Null removes it; left out keeps it.","maxLength":1398204},"favicon":{"type":["string","null"],"description":"The favicon as a base64 data: URI (data:image/png;base64,…): PNG, ICO or WebP, at most 256 KB and 1024px on the longest side. SVG and remote URLs are refused. Null removes it; left out keeps it.","maxLength":349628}},"required":["theme"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Appearance"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/approvals":{"get":{"tags":["Environment › Approvals"],"summary":"List the pending requests from agents to act as one of this environment's people (CIBA): which app, for whom, and what it asks.","description":"Requires scope `approvals:read`. Danger: read.","operationId":"environment_approvals_list","x-action":"approvals.list","x-scope":"approvals:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentRequest"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/approvals/{id}":{"get":{"tags":["Environment › Approvals","Organization › Approvals"],"summary":"Where an approval this key asked for stands","description":"Any key may poll the approvals it raised, and only those: another key's id is a 404.\n`status` is `pending`, `approved`, `denied`, `expired` or `consumed`.\n\n\nWhere an approval this key asked for stands: Any organization key — or a member's token — may poll the approvals it raised, and only\nthose: another credential's id is a 404. `status` is `pending`, `approved`, `denied`, `expired` or `consumed`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","approved","denied","expired","consumed"]}}},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[]}},"/v1/approvals/{id}/deny":{"post":{"tags":["Environment › Approvals"],"summary":"Deny a pending approval request (CIBA) for the person it was raised for: the agent gets access_denied and no token.","description":"Requires scope `approvals:write`. Danger: destructive.","operationId":"environment_approvals_deny","x-action":"approvals.deny","x-scope":"approvals:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps":{"get":{"tags":["Environment › Applications"],"summary":"List apps","description":"Requires scope `apps:read`. Never a secret.","operationId":"environment_apps_list","x-action":"apps.list","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/App"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"apps:read","x-scope-aliases":[],"x-danger":"read"},"post":{"tags":["Environment › Applications"],"summary":"Register an app","description":"Requires scope `apps:write`. Two ways to describe it:\n\n- **From a blueprint** — send `GET /apps/{id}/blueprint`'s document from another\n environment as `blueprint` (promote staging to production). `name`,\n `redirect_uris` and `post_logout_redirect_uris` beside it replace the\n blueprint's own, since those usually name the environment it came from. A\n `private_key_jwt` blueprint needs `jwks`.\n- **Short form** — `name` and `type` (`web`, `spa`, `cli`, `service`, `agent`; default\n `web`), which decide the client type, grants and default scopes as the console's\n \"Create app\" does. `advanced` takes `client_type` and `grant_types`.\n\nThe response carries `client_secret` for an app that authenticates with one —\n**once**. Only its hash is kept, and an idempotent replay returns `client_secret: null`.\n\nA platform scope reserved for the console (`vault.manage`, `decisions:read`) is\nrefused (`scope_not_grantable`), as is a registered API's scope this app's owner may\nnot hold. Danger: critical — it mints a credential.\n","operationId":"environment_apps_create","x-action":"apps.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"blueprint":{"$ref":"#/components/schemas/AppBlueprint"},"name":{"type":"string","maxLength":190},"type":{"type":"string","enum":["web","spa","cli","service","agent","advanced"],"default":"web"},"client_type":{"type":"string","enum":["confidential","public"]},"grant_types":{"type":"array","items":{"type":"string"}},"redirect_uris":{"type":"array","items":{"type":"string"}},"post_logout_redirect_uris":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"first_party":{"type":"boolean","default":false},"manifest_url":{"type":["string","null"],"format":"uri","maxLength":500,"description":"Where the app publishes its roles-and-permissions manifest (short form)."},"organization_id":{"type":["string","null"],"description":"The owning organization; null for the environment's own app."},"jwks":{"type":["object","null"],"description":"A public JWK Set, for a `private_key_jwt` app."}}}}}},"responses":{"201":{"description":"Registered.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"apps:write","x-scope-aliases":[],"x-danger":"critical"}},"/v1/apps/{id}":{"get":{"tags":["Environment › Applications"],"summary":"Get one app (OAuth client) by its id or its client_id: its kind, grants, redirect URIs, scopes and settings. Never a secret.","description":"Requires scope `apps:read`. Danger: read.","operationId":"environment_apps_get","x-action":"apps.get","x-scope":"apps:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Applications"],"summary":"Rename an app and replace its redirect URIs or sign-out redirect URIs. Fields left out are unchanged.","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_update","x-action":"apps.update","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":190},"redirect_uris":{"type":"array","description":"The COMPLETE list afterwards.","maxItems":50,"items":{"type":"string","maxLength":2048}},"post_logout_redirect_uris":{"type":"array","description":"The COMPLETE list afterwards.","maxItems":50,"items":{"type":"string","maxLength":2048}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Applications"],"summary":"Delete an app and every secret it holds. Anything signing in as it stops working immediately.","description":"Requires scope `apps:write`. Danger: critical.","operationId":"environment_apps_delete","x-action":"apps.delete","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/api-key-prefix":{"put":{"tags":["Environment › Applications"],"summary":"Set the prefix of an app's customer API keys (acme_live), which lets its users create keys for it, or null to stop new keys.","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_settings_api_key_prefix","x-action":"apps.settings.api_key_prefix","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"prefix":{"type":["string","null"],"description":"2–16 lowercase letters or digits starting with a letter, then `_live` or `_test`. Null or left out: no new keys.","maxLength":32}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/backchannel-logout":{"put":{"tags":["Environment › Applications"],"summary":"Set or clear the URI an app is sent a logout token at when somebody signs out (OIDC Back-Channel Logout).","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_settings_backchannel_logout","x-action":"apps.settings.backchannel_logout","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"uri":{"type":["string","null"],"description":"HTTPS (HTTP on localhost only). Null or left out: the app is not told.","format":"uri","maxLength":2000},"session_required":{"type":"boolean","description":"Every logout token carries `sid`. Default false."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/blueprint":{"get":{"tags":["Environment › Applications"],"summary":"Export an app's configuration as a blueprint","description":"Requires scope `apps:read`. `{id}` is the app's id or its `client_id`. The document\ncarries the app's settings and none of its identity or credentials: no client id,\nno secret, no key set, no owning organization. `POST /apps` with it as `blueprint`\ncreates the same app in another environment.\n","operationId":"environment_apps_blueprint","x-action":"apps.blueprint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AppBlueprint"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"apps:read","x-scope-aliases":[],"x-danger":"read"}},"/v1/apps/{id}/client-credentials":{"put":{"tags":["Environment › Applications"],"summary":"Turn client-credentials authentication on or off for a confidential app; other grants and scopes stay unchanged.","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_settings_client_credentials","x-action":"apps.settings.client_credentials","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/copy":{"post":{"tags":["Environment › Applications"],"summary":"Copy an app into another environment of this project, with a new client id and secret there. A person on the environment console only; a key exports the blueprint instead.","description":"Requires scope `apps:write`. Danger: critical.","operationId":"environment_apps_copy","x-action":"apps.copy","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environment_id":{"type":"string","description":"The environment to copy into: another environment of this project.","maxLength":64},"name":{"type":"string","description":"What to call the copy there.","minLength":1,"maxLength":190},"redirect_uris":{"type":"array","description":"Its redirect URIs there — staging's callback is rarely production's. Left out, none.","maxItems":50,"items":{"type":"string","maxLength":2048}}},"required":["environment_id","name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/manifest":{"put":{"tags":["Environment › Applications"],"summary":"Set or clear the URL an app publishes its roles-and-permissions manifest at. Does not fetch it; apps.manifest.sync does.","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_manifest_set","x-action":"apps.manifest.set","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"manifest_url":{"type":["string","null"],"description":"An absolute URL; null or left out clears it.","format":"uri","maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/scopes":{"put":{"tags":["Environment › Applications"],"summary":"Replace an app's complete scope set — the ceiling of what it may request, applied from its next token.","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_scopes_set","x-action":"apps.scopes.set","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"type":"array","description":"Required. The COMPLETE scope set afterwards; an empty list removes every scope.","maxItems":200,"items":{"type":"string","maxLength":128}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/secrets":{"get":{"tags":["Environment › Applications"],"summary":"List an app's live client secrets","description":"Requires scope `apps:read`. Every live secret, newest first: its id (what\n`DELETE /apps/{id}/secrets/{secret_id}` names), the characters it ends in, and its\ndates — never a secret. `expires_at` is set on one a rotation replaced, still working\nthrough its overlap. An app holds a handful at most, so there is no page to turn.\n","operationId":"environment_apps_secrets_list","x-action":"apps.secrets.list","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AppSecret"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"apps:read","x-scope-aliases":[],"x-danger":"read"},"post":{"tags":["Environment › Applications"],"summary":"Mint a new client secret for an app and retire the current ones after grace_seconds (0 = at once). The new secret is returned once.","description":"Requires scope `apps:write`. Danger: critical.","operationId":"environment_apps_secrets_rotate","x-action":"apps.secrets.rotate","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"grace_seconds":{"type":"integer","description":"How long the current secrets keep working, in seconds. 0 stops them at once.","minimum":0,"maximum":2592000}},"required":["grace_seconds"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AppSecret"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/sync-manifest":{"post":{"tags":["Environment › Applications"],"summary":"Fetch an app's published manifest now and sync the roles and permissions it declares.","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_manifest_sync","x-action":"apps.manifest.sync","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ManifestSync"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/token-exchange":{"put":{"tags":["Environment › Applications"],"summary":"Turn token exchange (RFC 8693) on or off for a confidential app.","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_settings_token_exchange","x-action":"apps.settings.token_exchange","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/apps/{id}/token-lifetime":{"put":{"tags":["Environment › Applications"],"summary":"Set how long an app's access tokens live, in seconds, or null for the install's default.","description":"Requires scope `apps:write`. Danger: write.","operationId":"environment_apps_settings_token_lifetime","x-action":"apps.settings.token_lifetime","x-scope":"apps:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The app's id, or its `client_id`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"access_token_ttl":{"type":["integer","null"],"description":"Seconds, from 60 to the install's ceiling. Null or left out: the install's default."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/audit-events":{"get":{"tags":["Environment › Audit log"],"summary":"Read this environment's audit trail oldest first, optionally narrowed by action, actor type or organization; pass the last id as `after` to page.","description":"Requires scope `audit:read`. Danger: read.","operationId":"environment_audit_list","x-action":"audit.list","x-scope":"audit:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"action","in":"query","required":false,"schema":{"type":"string","description":"Only this action, e.g. `webhook.created`.","maxLength":190}},{"name":"actor_type","in":"query","required":false,"schema":{"type":"string","description":"Only entries by this kind of actor; `service` is a management key or an app.","enum":["user","service","system","operator","organization_member"]}},{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"Only this organization's entries.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/audit-log-events":{"get":{"tags":["Environment › App audit logs"],"summary":"Read audit events newest first, for one organization or the whole environment, filtered by action, actor, target and time range; pass `next_cursor` as `after` to page.","description":"Requires scope `audit_logs:read`. Danger: read.","operationId":"environment_audit_logs_events_list","x-action":"audit_logs.events.list","x-scope":"audit_logs:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"Only this organization's events. Required in effect for an organization's own administrator, whose events are the only ones they see.","maxLength":64}},{"name":"actions","in":"query","required":false,"schema":{"type":"array","description":"Only these actions, e.g. `invoice.voided`.","maxItems":50,"items":{"type":"string","maxLength":190}}},{"name":"actor_id","in":"query","required":false,"schema":{"type":"string","description":"Only events this actor caused.","maxLength":190}},{"name":"target_id","in":"query","required":false,"schema":{"type":"string","description":"Only events naming this target.","maxLength":190}},{"name":"range_start","in":"query","required":false,"schema":{"type":"string","description":"Only events that occurred at or after this time.","format":"date-time"}},{"name":"range_end","in":"query","required":false,"schema":{"type":"string","description":"Only events that occurred before this time.","format":"date-time"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"`desc` (default) for newest first, `asc` for oldest first.","enum":["desc","asc"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Events per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page.","maxLength":200}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogEvent"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › App audit logs"],"summary":"Record 1–100 audit events your app's users caused, each for one of your organizations (customers); checked against the action's schema when it has one and appended to that organization's tamper-evident chain. Send an Idempotency-Key.","description":"Requires scope `audit_logs:write`. Danger: write.","operationId":"environment_audit_logs_events_create","x-action":"audit_logs.events.create","x-scope":"audit_logs:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","description":"1–100 events, recorded all together or not at all.","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"organization_id":{"type":"string","description":"The organization (your customer) the event happened in.","maxLength":64},"action":{"type":"string","description":"What happened, as dotted words: `invoice.voided`, `user.signed_in`.","maxLength":190},"occurred_at":{"type":"string","description":"When it happened: ISO 8601 with a time zone, to the millisecond.","format":"date-time"},"actor":{"type":"object","properties":{"id":{"type":"string","description":"Your id for whoever did it.","maxLength":190},"type":{"type":"string","description":"What kind of actor: `user`, `api_key`, `system`.","maxLength":100},"name":{"type":["string","null"],"description":"A name a person reads in the log.","maxLength":190},"metadata":{"type":"object","description":"Up to 50 names to strings, numbers, booleans or null.","properties":[]}},"required":["id","type"]},"targets":{"type":"array","description":"What it was done to.","maxItems":50,"items":{"type":"object","properties":{"id":{"type":"string","maxLength":190},"type":{"type":"string","description":"What kind of thing: `invoice`, `user`, `report`.","maxLength":100},"name":{"type":["string","null"],"maxLength":190},"metadata":{"type":"object","properties":[]}},"required":["id","type"]}},"context":{"type":"object","properties":{"location":{"type":["string","null"],"description":"Where it came from — usually the client's IP address.","maxLength":64},"user_agent":{"type":["string","null"],"maxLength":512}}},"metadata":{"type":"object","description":"Up to 50 names to strings, numbers, booleans or null; values up to 500 characters.","properties":[]}},"required":["organization_id","action","occurred_at","actor"]}}},"required":["events"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogEventBatch"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/audit-log-events/verify":{"get":{"tags":["Environment › App audit logs"],"summary":"Re-hash one organization's audit-event chain (from the oldest event retention kept, or from_sequence) and report whether every event is unchanged and in place.","description":"Requires scope `audit_logs:read`. Danger: read.","operationId":"environment_audit_logs_verify","x-action":"audit_logs.verify","x-scope":"audit_logs:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"The organization whose chain to verify. An organization's own administrator may leave it out.","maxLength":64}},{"name":"from_sequence","in":"query","required":false,"schema":{"type":"integer","description":"Start here rather than at the oldest event kept.","minimum":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Verify at most this many events. Default 10,000.","minimum":1,"maximum":10000}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogVerification"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/audit-log-exports":{"post":{"tags":["Environment › App audit logs"],"summary":"Start a CSV export of audit events (same filters as the list). It is written on the queue: poll audit_logs.exports.get until state is ready, then download from its short-lived url.","description":"Requires scope `audit_logs:export`. Danger: write.","operationId":"environment_audit_logs_exports_create","x-action":"audit_logs.exports.create","x-scope":"audit_logs:export","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","description":"Only this organization's events. Required in effect for an organization's own administrator, whose events are the only ones they see.","maxLength":64},"actions":{"type":"array","description":"Only these actions, e.g. `invoice.voided`.","maxItems":50,"items":{"type":"string","maxLength":190}},"actor_id":{"type":"string","description":"Only events this actor caused.","maxLength":190},"target_id":{"type":"string","description":"Only events naming this target.","maxLength":190},"range_start":{"type":"string","description":"Only events that occurred at or after this time.","format":"date-time"},"range_end":{"type":"string","description":"Only events that occurred before this time.","format":"date-time"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogExport"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/audit-log-exports/{id}":{"get":{"tags":["Environment › App audit logs"],"summary":"Read an audit-log export's state; once ready it carries a signed download url valid for a few minutes (read it again for a fresh one).","description":"Requires scope `audit_logs:read`. Danger: read.","operationId":"environment_audit_logs_exports_get","x-action":"audit_logs.exports.get","x-scope":"audit_logs:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The export id.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogExport"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/audit-log-schemas":{"get":{"tags":["Environment › App audit logs"],"summary":"List the audit-log schemas this environment validates events against, one per action.","description":"Requires scope `audit_logs:read`. Danger: read.","operationId":"environment_audit_logs_schemas_list","x-action":"audit_logs.schemas.list","x-scope":"audit_logs:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogSchema"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › App audit logs"],"summary":"Define the schema one audit-log action's events must match — allowed target types and metadata schemas (a subset of JSON Schema). Events of that action are then validated on arrival.","description":"Requires scope `audit_logs:manage`. Danger: write.","operationId":"environment_audit_logs_schemas_create","x-action":"audit_logs.schemas.create","x-scope":"audit_logs:manage","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","description":"The action this schema is for, e.g. `invoice.voided`.","maxLength":190},"targets":{"type":["array","null"],"description":"The target types this action's events may name, each with an optional metadata schema. Leave out to allow any.","maxItems":50,"items":{"type":"object","properties":{"type":{"type":"string","description":"A target type events of this action may name.","maxLength":100},"metadata":{"type":"object","description":"A metadata schema for targets of this type.","properties":[]}},"required":["type"]}},"actor_metadata":{"type":"object","description":"A metadata schema (a subset of JSON Schema) for the actor's metadata.","properties":[]},"metadata":{"type":"object","description":"A metadata schema (a subset of JSON Schema) for the event's own metadata.","properties":[]}},"required":["action"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogSchema"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/audit-log-schemas/{id}":{"get":{"tags":["Environment › App audit logs"],"summary":"Read the schema one audit-log action's events are validated against.","description":"Requires scope `audit_logs:read`. Danger: read.","operationId":"environment_audit_logs_schemas_get","x-action":"audit_logs.schemas.get","x-scope":"audit_logs:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The action, e.g. `invoice.voided`.","maxLength":190}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogSchema"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Environment › App audit logs"],"summary":"Replace an audit-log action's schema with a new version (omitted parts are removed). Recorded events keep the version they were checked against.","description":"Requires scope `audit_logs:manage`. Danger: write.","operationId":"environment_audit_logs_schemas_update","x-action":"audit_logs.schemas.update","x-scope":"audit_logs:manage","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The action whose schema to replace.","maxLength":190}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"targets":{"type":["array","null"],"description":"The target types this action's events may name, each with an optional metadata schema. Leave out to allow any.","maxItems":50,"items":{"type":"object","properties":{"type":{"type":"string","description":"A target type events of this action may name.","maxLength":100},"metadata":{"type":"object","description":"A metadata schema for targets of this type.","properties":[]}},"required":["type"]}},"actor_metadata":{"type":"object","description":"A metadata schema (a subset of JSON Schema) for the actor's metadata.","properties":[]},"metadata":{"type":"object","description":"A metadata schema (a subset of JSON Schema) for the event's own metadata.","properties":[]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogSchema"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › App audit logs"],"summary":"Delete an audit-log action's schema. Its events are then accepted unchecked — or refused, if the environment is in strict mode.","description":"Requires scope `audit_logs:manage`. Danger: destructive.","operationId":"environment_audit_logs_schemas_delete","x-action":"audit_logs.schemas.delete","x-scope":"audit_logs:manage","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The action whose schema to delete.","maxLength":190}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/audit-log-settings":{"get":{"tags":["Environment › App audit logs"],"summary":"Read this environment's audit-log settings: retention in days and whether strict schemas are on.","description":"Requires scope `audit_logs:read`. Danger: read.","operationId":"environment_audit_logs_settings_get","x-action":"audit_logs.settings.get","x-scope":"audit_logs:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogSettings"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › App audit logs"],"summary":"Change this environment's audit-log retention (days, 1–3650) and strict mode. Shortening retention deletes older events at the next daily prune — irreversibly.","description":"Requires scope `audit_logs:manage`. Danger: destructive.","operationId":"environment_audit_logs_settings_update","x-action":"audit_logs.settings.update","x-scope":"audit_logs:manage","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"retention_days":{"type":"integer","description":"Keep events this many days after they arrive.","minimum":1,"maximum":3650},"strict_schemas":{"type":"boolean","description":"Refuse events whose action has no schema."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuditLogSettings"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/billing-account":{"patch":{"tags":["Organization › Billing"],"summary":"Update the organization billing contact and invoice address.","description":"Requires scope `id:billing:write` (until v3.1 also accepted as `billing:write`) and a role that may `manage-billing`. Danger: write.","operationId":"organization_billing_account_update","x-action":"billing.account.update","x-scope":"id:billing:write","x-scope-aliases":["billing:write"],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"billing_email":{"type":"string","format":"email","maxLength":254},"invoice_name":{"type":"string","maxLength":255},"address_line1":{"type":"string","maxLength":255},"address_line2":{"type":["string","null"],"maxLength":255},"postal_code":{"type":"string","maxLength":32},"city":{"type":"string","maxLength":255},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]},"tax_id":{"type":["string","null"],"maxLength":64}},"required":["billing_email","invoice_name","address_line1","postal_code","city","country"]}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/devices":{"get":{"tags":["Environment › Devices"],"summary":"List the caller's own enrolled devices","description":"Requires scope `devices.manage`. The push token is never returned — it is a\ncapability, and nothing outside a delivery attempt needs it.\n","security":[{"AuthenticatorToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Device"}}}}]}}}},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"$ref":"#/components/responses/BearerForbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[]},"post":{"tags":["Environment › Devices"],"summary":"Enrol a device, or re-enrol after a push-token rotation","description":"Requires scope `devices.manage`. Idempotent on `install_id`: posting again with a\nfresh `push_token` updates the existing enrolment and returns 200, so the app has\nno separate rotation call to get wrong. Re-enrolling also clears circuit-breaker\nstate and revives a device that was retired by a permanent transport error.\n\nThe device is always bound to the token's own subject. Nothing in the body can\nchange whose device it is.\n","security":[{"AuthenticatorToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["install_id","platform","name"],"properties":{"install_id":{"type":"string","minLength":26,"maxLength":26,"description":"A ULID the app generates on first launch and keeps in platform secure\nstorage. Deliberately NOT a vendor device id — `identifierForVendor`\nand `ANDROID_ID` both reset on reinstall and are shared across one\nvendor's apps.\n"},"platform":{"type":"string","enum":["ios","android"]},"push_token":{"type":["string","null"],"maxLength":4096},"enrolment_token":{"type":["string","null"],"maxLength":4096,"description":"Required for a new installation."},"name":{"type":"string","maxLength":100,"description":"Shown in the console. Control characters are stripped."},"app_version":{"type":["string","null"],"maxLength":32},"os_version":{"type":["string","null"],"maxLength":32},"model":{"type":["string","null"],"maxLength":64}}}}}},"responses":{"200":{"description":"The installation was already enrolled; its details were updated.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Device"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"201":{"description":"Enrolled.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Device"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"$ref":"#/components/responses/BearerForbidden"},"409":{"description":"This `install_id` belongs to a different user. Refused rather than reassigned:\nsilently moving it would let one user capture another's push stream by guessing\nan install id.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[]}},"/v1/devices/{id}":{"delete":{"tags":["Environment › Devices"],"summary":"Deregister a device","description":"Requires scope `devices.manage`. Another user's device answers exactly as a\nmissing one does, so this cannot be used to confirm that someone else's handset\nexists.\n","security":[{"AuthenticatorToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Removed."},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"$ref":"#/components/responses/BearerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/directories":{"get":{"tags":["Environment › Directory Sync"],"summary":"List the directories (SCIM, Google Workspace, Microsoft Entra) syncing people in, optionally for one organization, with their last sync error.","description":"Requires scope `directory_sync:read`. Danger: read.","operationId":"environment_directories_list","x-action":"directories.list","x-scope":"directory_sync:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only this organization's.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Directory"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Directory Sync"],"summary":"Register a SCIM directory for an organization. Answers the SCIM base URL and a bearer token, shown once.","description":"Requires scope `directory_sync:write`. Danger: critical.","operationId":"environment_directories_create","x-action":"directories.create","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","description":"The organization whose people it provisions.","maxLength":64},"name":{"type":"string","description":"What administrators call it: \"Okta SCIM\".","maxLength":120}},"required":["organization_id","name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/connect":{"post":{"tags":["Environment › Directory Sync"],"summary":"Connect a Google Workspace or Microsoft Entra directory to sync an organization's people from, verifying the credentials first. Runs the first sync.","description":"Requires scope `directory_sync:write`. Danger: critical.","operationId":"environment_directories_connect","x-action":"directories.connect","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","description":"The organization whose people it provisions.","maxLength":64},"provider":{"type":"string","description":"google_workspace or microsoft_entra.","enum":["google_workspace","microsoft_entra"]},"credentials":{"type":"object","description":"The provider's credentials. Write-only: sealed, never returned.","properties":{"service_account_json":{"type":"string","description":"Google: the service account's JSON key, whole.","maxLength":20000},"admin_email":{"type":"string","description":"Google: the administrator the service account acts as.","maxLength":190},"tenant_id":{"type":"string","description":"Entra: the directory (tenant) id.","maxLength":190},"client_id":{"type":"string","description":"Entra: the app registration's client id.","maxLength":190},"client_secret":{"type":"string","description":"Entra: the app registration's client secret.","maxLength":500}}}},"required":["organization_id","provider","credentials"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/connect-hris":{"post":{"tags":["Environment › Directory Sync"],"summary":"Connect an HR system (Workday, BambooHR, Rippling, HiBob or Personio) to sync an organization's people from, verifying the credentials first. The first sync is queued.","description":"Requires scope `directory_sync:write`. Danger: critical.","operationId":"environment_directories_hris_connect","x-action":"directories.hris.connect","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","description":"The organization whose people it provisions.","maxLength":64},"provider":{"type":"string","description":"workday, bamboohr, rippling, hibob or personio.","enum":["workday","bamboohr","rippling","hibob","personio"]},"name":{"type":"string","description":"What administrators call it. Defaults to the HR system's name.","maxLength":120},"credentials":{"type":"object","description":"The HR system's credentials, in the keys its setup guide names. Write-only: sealed, never returned.","properties":{"report_url":{"type":"string","description":"Workday: Report web-service URL.","maxLength":20000},"username":{"type":"string","description":"Workday: Integration system user.","maxLength":20000},"password":{"type":"string","description":"Workday: Integration system user password (secret).","maxLength":20000},"client_id":{"type":"string","description":"Workday: API client ID; Personio: Client ID.","maxLength":20000},"client_secret":{"type":"string","description":"Workday: API client secret (secret); Personio: Client secret (secret).","maxLength":20000},"refresh_token":{"type":"string","description":"Workday: Refresh token (secret).","maxLength":20000},"subdomain":{"type":"string","description":"BambooHR: Company subdomain.","maxLength":20000},"api_key":{"type":"string","description":"BambooHR: API key (secret).","maxLength":20000},"api_token":{"type":"string","description":"Rippling: API token (secret).","maxLength":20000},"service_user_id":{"type":"string","description":"HiBob: Service user ID.","maxLength":20000},"service_user_token":{"type":"string","description":"HiBob: Service user token (secret).","maxLength":20000}}},"custom_attributes":{"type":"array","description":"The HR system's own field names to copy onto each person, verbatim.","maxItems":50,"items":{"type":"string","maxLength":190}},"sync_interval_minutes":{"type":["integer","null"],"description":"Minutes between scheduled pulls, 15 to 1440. Omitted or null: the platform default (hourly).","minimum":15,"maximum":1440}},"required":["organization_id","provider","credentials"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/{id}":{"get":{"tags":["Environment › Directory Sync"],"summary":"Read one inbound directory: its provider, status, SCIM base URL and last sync error. Never its token or credentials.","description":"Requires scope `directory_sync:read`. Danger: read.","operationId":"environment_directories_get","x-action":"directories.get","x-scope":"directory_sync:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Directory Sync"],"summary":"Rename an inbound directory.","description":"Requires scope `directory_sync:write`. Danger: write.","operationId":"environment_directories_update","x-action":"directories.update","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64},"name":{"type":"string","description":"The new name.","maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Directory Sync"],"summary":"Delete an inbound directory. Its token stops working; the people it provisioned keep their accounts.","description":"Requires scope `directory_sync:write`. Danger: destructive.","operationId":"environment_directories_delete","x-action":"directories.delete","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/{id}/credentials":{"put":{"tags":["Environment › Directory Sync"],"summary":"Replace a pull directory's provider credentials, verifying the new ones first. Write-only; never returned.","description":"Requires scope `directory_sync:write`. Danger: critical.","operationId":"environment_directories_credentials_replace","x-action":"directories.credentials.replace","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64},"credentials":{"type":"object","description":"The new credentials, in the keys the provider's setup names (Google: service_account_json, admin_email; Entra: tenant_id, client_id, client_secret). Write-only.","properties":{"report_url":{"type":"string","maxLength":20000},"username":{"type":"string","maxLength":20000},"password":{"type":"string","maxLength":20000},"client_id":{"type":"string","maxLength":20000},"client_secret":{"type":"string","maxLength":20000},"refresh_token":{"type":"string","maxLength":20000},"subdomain":{"type":"string","maxLength":20000},"api_key":{"type":"string","maxLength":20000},"api_token":{"type":"string","maxLength":20000},"service_user_id":{"type":"string","maxLength":20000},"service_user_token":{"type":"string","maxLength":20000},"service_account_json":{"type":"string","maxLength":20000},"admin_email":{"type":"string","maxLength":20000},"tenant_id":{"type":"string","maxLength":20000}}}},"required":["credentials"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/{id}/group-roles":{"post":{"tags":["Environment › Directory Sync"],"summary":"Map a directory group onto a role (everyone in the group holds it as membership syncs), or unmap it.","description":"Requires scope `directory_sync:write`. Danger: write.","operationId":"environment_directories_groups_map","x-action":"directories.groups.map","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64},"group_id":{"type":"string","description":"One of the directory's groups.","maxLength":64},"role_id":{"type":"string","description":"A role the organization's own people may hold.","maxLength":64},"mapped":{"type":"boolean","description":"true to map the group onto the role, false to unmap it."}},"required":["group_id","role_id","mapped"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/DirectoryGroup"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/{id}/groups":{"get":{"tags":["Environment › Directory Sync"],"summary":"List the groups a directory has synced, with the role ids each group is mapped onto.","description":"Requires scope `directory_sync:read`. Danger: read.","operationId":"environment_directories_groups_list","x-action":"directories.groups.list","x-scope":"directory_sync:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DirectoryGroup"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/{id}/rotate":{"post":{"tags":["Environment › Directory Sync"],"summary":"Issue a new bearer token for a SCIM directory, returned once. The old token stops working immediately.","description":"Requires scope `directory_sync:write`. Danger: critical.","operationId":"environment_directories_token_rotate","x-action":"directories.token.rotate","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/{id}/status":{"post":{"tags":["Environment › Directory Sync"],"summary":"Pause or resume an inbound directory's provisioning.","description":"Requires scope `directory_sync:write`. Danger: write.","operationId":"environment_directories_status_set","x-action":"directories.status.set","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","description":"true to resume provisioning, false to pause it."},"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},"required":["active"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/{id}/sync":{"post":{"tags":["Environment › Directory Sync"],"summary":"Pull a Google Workspace, Microsoft Entra or HR-system directory now, on a worker. `full` asks an HR system for everybody rather than what changed.","description":"Requires scope `directory_sync:write`. Danger: write.","operationId":"environment_directories_sync","x-action":"directories.sync","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64},"full":{"type":"boolean","description":"Ask an HR system that syncs incrementally for everybody, not only what changed. Ignored by other providers."}}}}}},"responses":{"202":{"description":"Accepted — or held for a person's approval (`error: approval_required`): poll `approval.poll_url`, then repeat the request with `Cbox-Approval`.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Directory"}}},{"type":"object","required":["error","message","approval"],"properties":{"error":{"type":"string","enum":["approval_required"]},"message":{"type":"string"},"approval":{"type":"object","required":["id","status","binding_code","expires_at","poll_url"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"binding_code":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"poll_url":{"type":"string","format":"uri"}}}}}]}}}},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/directories/{id}/sync-settings":{"patch":{"tags":["Environment › Directory Sync"],"summary":"Set how often a pull directory syncs, and for an HR system which of its fields pass through onto people.","description":"Requires scope `directory_sync:write`. Danger: write.","operationId":"environment_directories_sync_settings_update","x-action":"directories.sync_settings.update","x-scope":"directory_sync:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The directory's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64},"sync_interval_minutes":{"type":["integer","null"],"description":"Minutes between scheduled pulls, 15 to 1440. null returns to the platform default (hourly).","minimum":15,"maximum":1440},"custom_attributes":{"type":"array","description":"HR systems only: the HR system's own field names to copy onto each person, verbatim.","maxItems":50,"items":{"type":"string","maxLength":190}},"field_map":{"type":"object","description":"Workday only: the report column holding each field, where it is not the default name.","properties":{"id":{"type":"string","description":"The report column holding id. Default: Employee_ID.","maxLength":190},"email":{"type":"string","description":"The report column holding email. Default: Work_Email.","maxLength":190},"first_name":{"type":"string","description":"The report column holding first_name. Default: Legal_First_Name.","maxLength":190},"last_name":{"type":"string","description":"The report column holding last_name. Default: Legal_Last_Name.","maxLength":190},"display_name":{"type":"string","description":"The report column holding display_name. Default: Preferred_Name.","maxLength":190},"active":{"type":"string","description":"The report column holding active. Default: Active_Status.","maxLength":190},"on_leave":{"type":"string","description":"The report column holding on_leave. Default: On_Leave.","maxLength":190},"hire_date":{"type":"string","description":"The report column holding hire_date. Default: Hire_Date.","maxLength":190},"termination_date":{"type":"string","description":"The report column holding termination_date. Default: Termination_Date.","maxLength":190},"department_id":{"type":"string","description":"The report column holding department_id. Default: Supervisory_Organization_ID.","maxLength":190},"department":{"type":"string","description":"The report column holding department. Default: Supervisory_Organization.","maxLength":190},"manager_id":{"type":"string","description":"The report column holding manager_id. Default: Manager_Employee_ID.","maxLength":190},"title":{"type":"string","description":"The report column holding title. Default: Business_Title.","maxLength":190}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Directory"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/environment-domain":{"get":{"tags":["Environment › Domains"],"summary":"Read this environment's custom domain, and the DNS TXT record that proves a pending one.","description":"Requires scope `domains:read`. Danger: read.","operationId":"environment_domains_get","x-action":"domains.get","x-scope":"domains:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CustomDomain"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Domains"],"summary":"Start serving this environment on a custom domain: returns the DNS TXT record that proves you control it.","description":"Requires scope `domains:write`. Danger: write.","operationId":"environment_domains_add","x-action":"domains.add","x-scope":"domains:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The domain, for example login.example.com.","maxLength":253}},"required":["domain"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CustomDomain"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Domains"],"summary":"Stop serving this environment on its custom domain. Anything using that domain stops reaching the environment.","description":"Requires scope `domains:write`. Danger: destructive.","operationId":"environment_domains_remove","x-action":"domains.remove","x-scope":"domains:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/environment-domain/verify":{"post":{"tags":["Environment › Domains"],"summary":"Look for the pending domain's DNS TXT record and, once it is visible, serve this environment on that domain.","description":"Requires scope `domains:write`. Danger: write.","operationId":"environment_domains_verify","x-action":"domains.verify","x-scope":"domains:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CustomDomain"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/environment-keys":{"get":{"tags":["Environment › Secret keys"],"summary":"List this environment's management keys (names, scopes, parents, expiry, last use — never their values).","description":"Requires scope `keys:read`. Danger: read.","operationId":"environment_keys_list","x-action":"keys.list","x-scope":"keys:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ManagementKey"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Secret keys"],"summary":"Mint a management key for this environment, at most as wide as the caller. The value is returned once, as `token`.","description":"Requires scope `keys:write`. Danger: critical.","operationId":"environment_keys_create","x-action":"keys.create","x-scope":"keys:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"scopes":{"type":"array","description":"The scopes the key carries. From a key: a subset of its own.","minItems":1,"maxItems":64,"items":{"type":"string","maxLength":64}},"expires_at":{"type":["string","null"],"description":"When it stops working. From a key: required to be no later than the parent; defaults to the latest allowed.","format":"date-time"},"description":{"type":["string","null"],"description":"What it is for — shown beside it in the console.","maxLength":500},"require_approval":{"type":"object","description":"Which of this key's actions need its owner's approval on their device first. From a key: never weaker than its own.","properties":{"min_danger":{"type":["string","null"],"description":"Every action at or above this danger waits for a person's approval.","enum":["write","destructive","critical"]},"actions":{"type":"array","description":"These actions wait for approval whatever their danger.","maxItems":100,"items":{"type":"string","maxLength":100}}}}},"required":["name","scopes"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ManagementKey"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/environment-keys/{id}":{"delete":{"tags":["Environment › Secret keys","Organization › Keys"],"summary":"Revoke a management key and every key it minted, immediately.","description":"Requires scope `keys:write`. Danger: destructive.\n\nRevoke one of an environment's management keys; whatever uses it stops immediately.: Requires scope `id:environment-keys:write` (until v3.1 also accepted as `keys:write`) and a role that may `manage-environments`. Danger: destructive.","operationId":"environment_keys_revoke","x-action":"keys.revoke","x-scope":"keys:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The key to revoke."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}},{"required":false,"schema":{"type":"string"},"name":"environment_id","in":"query"}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/environment-keys/{id}/rotate":{"post":{"tags":["Environment › Secret keys"],"summary":"Rotate a management key: mint a successor with the same scopes and retire the old one after a grace period.","description":"Requires scope `keys:write`. Danger: critical.","operationId":"environment_keys_rotate","x-action":"keys.rotate","x-scope":"keys:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The key to rotate."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"grace_hours":{"type":"integer","description":"How long the old key keeps working. Default 24.","minimum":0,"maximum":168}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ManagementKey"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/environment-role-assignments/{id}":{"get":{"operationId":"environment_users_environment_roles_get","x-action":"users.environment_roles.get","tags":["Environment › Roles"],"summary":"Whether a user holds a role everywhere","description":"Requires scope `roles:read`. `200` with the grant, or `404` when it is not held.","parameters":[{"required":true,"schema":{"type":"string"},"name":"user_id","in":"query"},{"name":"id","in":"path","required":true,"description":"The role's id — or its manifest `key`, together with `?client_id=` naming the app that declared it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RoleClientId"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"Held.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RoleAssignment"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"roles:read","x-scope-aliases":[],"x-danger":"read"},"put":{"operationId":"environment_users_environment_roles_grant","x-action":"users.environment_roles.grant","tags":["Environment › Roles"],"summary":"Grant a role everywhere in the environment (staff)","description":"Requires scope `roles:write`. Idempotent. For your own people who act across every\ncustomer. Any role that belongs to no organization may be granted this way: an\napp-agnostic one reaches every app's tokens, one your app declared reaches only\nyour app's. An organization's own role is refused with `422 role_not_assignable`; a\ngrant that would form a segregation-of-duties conflict in any organization the\nperson belongs to with `409 role_conflict`.\n","parameters":[{"required":true,"schema":{"type":"string"},"name":"user_id","in":"query"},{"name":"id","in":"path","required":true,"description":"The role's id — or its manifest `key`, together with `?client_id=` naming the app that declared it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RoleClientId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"Granted (or already held).","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RoleAssignment"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"roles:write","x-scope-aliases":[],"x-danger":"critical"},"delete":{"operationId":"environment_users_environment_roles_revoke","x-action":"users.environment_roles.revoke","tags":["Environment › Roles"],"summary":"Take back an environment-wide grant","description":"Requires scope `roles:write`. Idempotent.","parameters":[{"required":true,"schema":{"type":"string"},"name":"user_id","in":"query"},{"name":"id","in":"path","required":true,"description":"The role's id — or its manifest `key`, together with `?client_id=` naming the app that declared it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RoleClientId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Not held any more."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"roles:write","x-scope-aliases":[],"x-danger":"destructive"}},"/v1/environments":{"get":{"tags":["Organization › Environments"],"summary":"List environments","description":"Requires scope `workspace:read` and permission to read environments. Returns only currently permitted environments; Billing-only members cannot list them.","operationId":"organization_environments_list","x-action":"environments.list","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Environment"}}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"id:organization:read","x-scope-aliases":["workspace:read"],"x-danger":"read"},"post":{"tags":["Organization › Environments"],"summary":"Create an environment","description":"Requires scope `environments:write` and the `manage-environments` capability\n(`id:write` for human members, or current ownership). Danger: critical — with `initial_key` it mints a credential.\n\nWith `initial_key`, the environment's first management key is minted in the same\ncall and returned once as `initial_key.token` — enough for an agent holding one\norganization key to stand an environment up and start configuring it on the\nenvironment's own host. An idempotent replay returns `initial_key.token: null`.\n","operationId":"organization_environments_create","x-action":"environments.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":120},"type":{"type":"string","enum":["production","sandbox"],"default":"production"},"project_id":{"type":"string","description":"The project (billing anchor) to create the environment under. Defaults to the organization's first project when omitted."},"initial_key":{"type":["object","null"],"description":"Mint the environment's first management key in the same call.","required":["name","scopes"],"properties":{"name":{"type":"string","maxLength":120},"scopes":{"type":"array","minItems":1,"items":{"type":"string"},"description":"Environment-key scopes, for example `apis:write`."},"expires_at":{"type":["string","null"],"format":"date-time"}}}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreatedEnvironment"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"description":"No such project in this organization","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"description":"Validation failed, the project's plan limit is reached, or `initial_key` asks for a scope no management key can carry","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/AdmissionUnavailable"}},"x-scope":"id:environments:write","x-scope-aliases":["environments:write"],"x-danger":"critical"}},"/v1/environments/{id}/domain":{"post":{"tags":["Organization › Environments"],"summary":"Start serving one of the organization's environments on a custom domain: returns the DNS TXT record that proves you control it.","description":"Requires scope `id:environments:write` (until v3.1 also accepted as `environments:write`) and a role that may `manage-environments`. Danger: write.","operationId":"organization_environments_domain_request","x-action":"environments.domain.request","x-scope":"id:environments:write","x-scope-aliases":["environments:write"],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The domain, for example login.example.com.","maxLength":253}},"required":["domain"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OrganizationCustomDomain"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Organization › Environments"],"summary":"Stop serving one of the organization's environments on its custom domain. Anything using that domain stops reaching it.","description":"Requires scope `id:environments:write` (until v3.1 also accepted as `environments:write`) and a role that may `manage-environments`. Danger: destructive.","operationId":"organization_environments_domain_remove","x-action":"environments.domain.remove","x-scope":"id:environments:write","x-scope-aliases":["environments:write"],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/environments/{id}/keys":{"post":{"tags":["Organization › Keys"],"summary":"Mint a management key for one of the organization's environments, with the scopes it needs. The value is returned once, as `token`.","description":"Requires scope `id:environment-keys:write` (until v3.1 also accepted as `keys:write`) and a role that may `manage-environments`. Danger: critical.","operationId":"organization_keys_environment_create","x-action":"keys.environment.create","x-scope":"id:environment-keys:write","x-scope-aliases":["keys:write"],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"scopes":{"type":"array","description":"The environment-key scopes it carries, for example `apis:write`.","minItems":1,"maxItems":64,"items":{"type":"string","maxLength":64}},"expires_at":{"type":["string","null"],"description":"When it stops working. Left out, it does not expire.","format":"date-time"}},"required":["name","scopes"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EnvironmentKey"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/environments/{id}/verify-domain":{"post":{"tags":["Organization › Environments"],"summary":"Look for the pending domain's DNS TXT record and, once it is visible, serve the environment on that domain.","description":"Requires scope `id:environments:write` (until v3.1 also accepted as `environments:write`) and a role that may `manage-environments`. Danger: write.","operationId":"organization_environments_domain_verify","x-action":"environments.domain.verify","x-scope":"id:environments:write","x-scope-aliases":["environments:write"],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OrganizationCustomDomain"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/events":{"get":{"tags":["Environment › Events"],"summary":"Read this environment's domain events (the facts webhooks deliver) oldest first; pass the last id as `after` to poll for new ones.","description":"Requires scope `events:read`. Danger: read.","operationId":"environment_events_list","x-action":"events.list","x-scope":"events:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"types","in":"query","required":false,"schema":{"type":"array","description":"Only these event types, e.g. `user.created`.","maxItems":50,"items":{"type":"string","maxLength":190}}},{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"Only this organization's events.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DomainEvent"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/feature-flags":{"get":{"tags":["Environment › Feature flags"],"summary":"List this environment's feature flags with their default, kill switch and targeting rules.","description":"Requires scope `feature_flags:read`. Danger: read.","operationId":"environment_feature_flags_list","x-action":"feature_flags.list","x-scope":"feature_flags:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FeatureFlag"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Feature flags"],"summary":"Define a feature flag: a key apps ask about, its default, and who it is on for — named users, named organizations, a rollout percentage.","description":"Requires scope `feature_flags:write`. Danger: write.","operationId":"environment_feature_flags_create","x-action":"feature_flags.create","x-scope":"feature_flags:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"What code asks for and the `feature_flags` claim carries: lowercase letters and digits, with `-`, `_` or `.` between them. Fixed once created.","maxLength":64},"description":{"type":["string","null"],"maxLength":500},"enabled":{"type":"boolean","description":"The kill switch: off means off for everyone, whatever the rules say. Defaults to true."},"default_value":{"type":"boolean","description":"The answer when no rule matches. Defaults to false."},"users":{"type":"array","description":"Rules for named users — they outrank every other rule. The COMPLETE list when sent.","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","description":"The user's id.","maxLength":128},"enabled":{"type":"boolean","description":"On (true, the default) or off for them, whatever the organization, rollout or default say."}},"required":["id"]}},"organizations":{"type":"array","description":"Rules for named organizations — they outrank the rollout and the default. The COMPLETE list when sent.","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","description":"The organization's id.","maxLength":128},"enabled":{"type":"boolean","description":"On (true, the default) or off for them, whatever the organization, rollout or default say."}},"required":["id"]}},"rollout_percentage":{"type":["integer","null"],"description":"On for this percentage of everyone else, by a stable hash of the user id (or the organization id without one). null for no rollout.","minimum":0,"maximum":100}},"required":["key"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FeatureFlag"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/feature-flags/evaluate":{"get":{"tags":["Environment › Feature flags"],"summary":"Evaluate every feature flag for a user in an organization: whether each is on, and the rule that decided. For app backends without a token in hand.","description":"Requires scope `feature_flags:read`. Danger: read.","operationId":"environment_feature_flags_evaluate","x-action":"feature_flags.evaluate","x-scope":"feature_flags:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","description":"The user to evaluate for. Left out, only organization rules, an organization-bucketed rollout and defaults apply.","maxLength":128}},{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"The organization the question is asked in.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FeatureFlagEvaluation"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/feature-flags/{id}":{"get":{"tags":["Environment › Feature flags"],"summary":"Read one feature flag: its default, whether it is switched on, and every user, organization and rollout rule.","description":"Requires scope `feature_flags:read`. Danger: read.","operationId":"environment_feature_flags_get","x-action":"feature_flags.get","x-scope":"feature_flags:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The flag's id."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FeatureFlag"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Feature flags"],"summary":"Change a feature flag: switch it on or off for everyone, change its default, or replace its user rules, organization rules or rollout percentage.","description":"Requires scope `feature_flags:write`. Danger: write.","operationId":"environment_feature_flags_update","x-action":"feature_flags.update","x-scope":"feature_flags:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The flag's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":["string","null"],"description":"Null or empty clears it.","maxLength":500},"enabled":{"type":"boolean","description":"The kill switch: off means off for everyone."},"default_value":{"type":"boolean","description":"The answer when no rule matches."},"users":{"type":"array","description":"Rules for named users — they outrank every other rule. The COMPLETE list when sent.","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","description":"The user's id.","maxLength":128},"enabled":{"type":"boolean","description":"On (true, the default) or off for them, whatever the organization, rollout or default say."}},"required":["id"]}},"organizations":{"type":"array","description":"Rules for named organizations — they outrank the rollout and the default. The COMPLETE list when sent.","maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string","description":"The organization's id.","maxLength":128},"enabled":{"type":"boolean","description":"On (true, the default) or off for them, whatever the organization, rollout or default say."}},"required":["id"]}},"rollout_percentage":{"type":["integer","null"],"description":"On for this percentage of everyone else, by a stable hash of the user id (or the organization id without one). null for no rollout.","minimum":0,"maximum":100}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FeatureFlag"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Feature flags"],"summary":"Delete a feature flag and its rules. Its key evaluates to off from now on; tokens already minted keep it until they expire.","description":"Requires scope `feature_flags:write`. Danger: destructive.","operationId":"environment_feature_flags_delete","x-action":"feature_flags.delete","x-scope":"feature_flags:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The flag's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fga/check":{"get":{"tags":["Environment › Fine-grained authorization"],"summary":"Check whether a subject has a relation on a resource — directly, through computed relations, parents or nested groups. Optionally at least as fresh as a consistency_token.","description":"Requires scope `fga:read`. Danger: read.","operationId":"environment_fga_check","x-action":"fga.check","x-scope":"fga:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"resource_type","in":"query","required":true,"schema":{"type":"string","description":"The resource's type: `document`.","maxLength":64}},{"name":"resource_id","in":"query","required":true,"schema":{"type":"string","description":"The resource's id: `readme`.","maxLength":128}},{"name":"relation","in":"query","required":true,"schema":{"type":"string","description":"The relation to check: `viewer`.","maxLength":64}},{"name":"subject_type","in":"query","required":true,"schema":{"type":"string","description":"The subject's type: `user`, or `group` for a userset.","maxLength":64}},{"name":"subject_id","in":"query","required":true,"schema":{"type":"string","description":"The subject's id: `alice`.","maxLength":128}},{"name":"subject_relation","in":"query","required":false,"schema":{"type":"string","description":"For a userset subject — `member` with `group`/`eng` asks about every member of eng.","maxLength":64}},{"name":"consistency_token","in":"query","required":false,"schema":{"type":["string","null"],"description":"A `consistency_token` a write returned: the answer is then at least as fresh as that write.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FgaCheck"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fga/check-batch":{"get":{"tags":["Environment › Fine-grained authorization"],"summary":"Run 1–100 checks in one round trip, each written resource#relation@subject (document:readme#viewer@user:alice), all at the same revision, answered in order.","description":"Requires scope `fga:read`. Danger: read.","operationId":"environment_fga_check_batch","x-action":"fga.check_batch","x-scope":"fga:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"checks","in":"query","required":true,"schema":{"type":"array","description":"1–100 checks, each `resource_type:resource_id#relation@subject_type:subject_id[#subject_relation]`.","minItems":1,"maxItems":100,"items":{"type":"string","maxLength":400}}},{"name":"consistency_token","in":"query","required":false,"schema":{"type":["string","null"],"description":"A `consistency_token` a write returned: the answer is then at least as fresh as that write.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FgaCheckBatch"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fga/delete-tuples":{"post":{"tags":["Environment › Fine-grained authorization"],"summary":"Delete 1–100 relationship tuples in one atomic batch. Revokes the access they granted, and everything inherited through them, at once.","description":"Requires scope `fga:write`. Danger: destructive.","operationId":"environment_fga_tuples_delete","x-action":"fga.tuples.delete","x-scope":"fga:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tuples":{"type":"array","description":"1–100 tuples to delete, all together or none.","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"resource_type":{"type":"string","description":"The resource's type, as the schema names it: `document`.","maxLength":64},"resource_id":{"type":"string","description":"Your id for the resource: `readme`.","maxLength":128},"relation":{"type":"string","description":"The relation: `viewer`.","maxLength":64},"subject":{"type":"object","description":"Who: one subject (`user:alice`), or a userset (`group:eng#member`).","properties":{"type":{"type":"string","description":"The subject's type: `user`, or `group` for a userset.","maxLength":64},"id":{"type":"string","description":"Your id for the subject: `alice`, `eng`.","maxLength":128},"relation":{"type":["string","null"],"description":"For a userset — everybody with this relation on the subject: `member` of `group:eng`. Omit for one subject.","maxLength":64}},"required":["type","id"]}},"required":["resource_type","resource_id","relation","subject"]}}},"required":["tuples"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FgaTupleWrite"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fga/resources":{"get":{"tags":["Environment › Fine-grained authorization"],"summary":"List the resources of one type a subject has a relation on (e.g. every document alice can view), through all inheritance; sorted ids, paged with after.","description":"Requires scope `fga:read`. Danger: read.","operationId":"environment_fga_resources_list","x-action":"fga.resources.list","x-scope":"fga:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"resource_type","in":"query","required":true,"schema":{"type":"string","description":"Which type of resource to list: `document`.","maxLength":64}},{"name":"relation","in":"query","required":true,"schema":{"type":"string","description":"The relation the subject must have: `viewer`.","maxLength":64}},{"name":"subject_type","in":"query","required":true,"schema":{"type":"string","description":"The subject's type: `user`.","maxLength":64}},{"name":"subject_id","in":"query","required":true,"schema":{"type":"string","description":"The subject's id: `alice`.","maxLength":128}},{"name":"subject_relation","in":"query","required":false,"schema":{"type":"string","description":"For a userset subject: `member` with `group`/`eng`.","maxLength":64}},{"name":"consistency_token","in":"query","required":false,"schema":{"type":["string","null"],"description":"A `consistency_token` a write returned: the answer is then at least as fresh as that write.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Ids per page, 1–1000. Default 100."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page.","maxLength":128}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FgaObject"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fga/schema":{"get":{"tags":["Environment › Fine-grained authorization"],"summary":"Read this environment's fine-grained authorization schema: the source text, its parsed types and relations, its version, and the current consistency token.","description":"Requires scope `fga:read`. Danger: read.","operationId":"environment_fga_schema_get","x-action":"fga.schema.get","x-scope":"fga:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FgaSchema"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Environment › Fine-grained authorization"],"summary":"Replace this environment's fine-grained authorization schema (types, relations and how each is decided). Changes the answer to every check at once; refused if invalid or if existing tuples would no longer fit.","description":"Requires scope `fga:schema`. Danger: critical.","operationId":"environment_fga_schema_update","x-action":"fga.schema.update","x-scope":"fga:schema","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string","description":"The schema, in the schema language: `type document` then ` relation viewer: [user, group#member] or editor or viewer from parent`.","maxLength":65536}},"required":["schema"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FgaSchema"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fga/subjects":{"get":{"tags":["Environment › Fine-grained authorization"],"summary":"List the subjects of one type that have a relation on a resource (e.g. every user who can view the readme), groups and inheritance expanded; sorted ids, paged with after.","description":"Requires scope `fga:read`. Danger: read.","operationId":"environment_fga_subjects_list","x-action":"fga.subjects.list","x-scope":"fga:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"resource_type","in":"query","required":true,"schema":{"type":"string","description":"The resource's type: `document`.","maxLength":64}},{"name":"resource_id","in":"query","required":true,"schema":{"type":"string","description":"The resource's id: `readme`.","maxLength":128}},{"name":"relation","in":"query","required":true,"schema":{"type":"string","description":"The relation: `viewer`.","maxLength":64}},{"name":"subject_type","in":"query","required":true,"schema":{"type":"string","description":"Which type of subject to list: `user`.","maxLength":64}},{"name":"consistency_token","in":"query","required":false,"schema":{"type":["string","null"],"description":"A `consistency_token` a write returned: the answer is then at least as fresh as that write.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Ids per page, 1–1000. Default 100."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page.","maxLength":128}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FgaObject"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fga/tuples":{"get":{"tags":["Environment › Fine-grained authorization"],"summary":"List stored relationship tuples oldest first, filtered by resource type and id, relation and subject; pass next_cursor as after to page.","description":"Requires scope `fga:read`. Danger: read.","operationId":"environment_fga_tuples_list","x-action":"fga.tuples.list","x-scope":"fga:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"resource_type","in":"query","required":false,"schema":{"type":"string","description":"Only tuples on this resource type.","maxLength":64}},{"name":"resource_id","in":"query","required":false,"schema":{"type":"string","description":"Only tuples on this resource.","maxLength":128}},{"name":"relation","in":"query","required":false,"schema":{"type":"string","description":"Only tuples of this relation.","maxLength":64}},{"name":"subject_type","in":"query","required":false,"schema":{"type":"string","description":"Only tuples naming this subject type.","maxLength":64}},{"name":"subject_id","in":"query","required":false,"schema":{"type":"string","description":"Only tuples naming this subject.","maxLength":128}},{"name":"subject_relation","in":"query","required":false,"schema":{"type":"string","description":"Only tuples naming a userset with this relation.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Tuples per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FgaTuple"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Fine-grained authorization"],"summary":"Write 1–100 relationship tuples (resource#relation@subject) in one atomic batch, each checked against the schema. Grants access at once; returns a consistency_token for checks that must see it.","description":"Requires scope `fga:write`. Danger: write.","operationId":"environment_fga_tuples_write","x-action":"fga.tuples.write","x-scope":"fga:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tuples":{"type":"array","description":"1–100 tuples to write, all together or none.","minItems":1,"maxItems":100,"items":{"type":"object","properties":{"resource_type":{"type":"string","description":"The resource's type, as the schema names it: `document`.","maxLength":64},"resource_id":{"type":"string","description":"Your id for the resource: `readme`.","maxLength":128},"relation":{"type":"string","description":"The relation: `viewer`.","maxLength":64},"subject":{"type":"object","description":"Who: one subject (`user:alice`), or a userset (`group:eng#member`).","properties":{"type":{"type":"string","description":"The subject's type: `user`, or `group` for a userset.","maxLength":64},"id":{"type":"string","description":"Your id for the subject: `alice`, `eng`.","maxLength":128},"relation":{"type":["string","null"],"description":"For a userset — everybody with this relation on the subject: `member` of `group:eng`. Omit for one subject.","maxLength":64}},"required":["type","id"]}},"required":["resource_type","resource_id","relation","subject"]}}},"required":["tuples"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FgaTupleWrite"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fga/validate-schema":{"get":{"tags":["Environment › Fine-grained authorization"],"summary":"Check a fine-grained authorization schema without saving it: every error by line, or the parsed types and canonical text.","description":"Requires scope `fga:read`. Danger: read.","operationId":"environment_fga_schema_validate","x-action":"fga.schema.validate","x-scope":"fga:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"schema","in":"query","required":true,"schema":{"type":"string","description":"The schema to check, in the schema language.","maxLength":65536}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FgaSchemaValidation"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/frontend-keys":{"get":{"tags":["Environment › Publishable keys"],"summary":"List the publishable frontend keys browser apps present to the Frontend API, in full, with their allowed origins.","description":"Requires scope `frontend_keys:read`. Danger: read.","operationId":"environment_frontend_keys_list","x-action":"frontend_keys.list","x-scope":"frontend_keys:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FrontendKey"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Publishable keys"],"summary":"Create a publishable frontend key for a browser app, usable only from the origins listed. The key is public by design.","description":"Requires scope `frontend_keys:write`. Danger: write.","operationId":"environment_frontend_keys_create","x-action":"frontend_keys.create","x-scope":"frontend_keys:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"What the key is for, so a person recognises it later.","maxLength":120},"mode":{"type":"string","description":"`test` or `live`; it is in the key's prefix.","enum":["test","live"]},"origins":{"type":"array","description":"The exact origins (scheme, host, port) allowed to present the key, for example https://app.example.com. At least one.","minItems":1,"maxItems":50,"items":{"type":"string","maxLength":255}}},"required":["name","mode","origins"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FrontendKey"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/frontend-keys/{id}":{"delete":{"tags":["Environment › Publishable keys"],"summary":"Revoke a publishable frontend key. Pages still holding it stop working immediately.","description":"Requires scope `frontend_keys:write`. Danger: destructive.","operationId":"environment_frontend_keys_revoke","x-action":"frontend_keys.revoke","x-scope":"frontend_keys:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The key's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/frontend-keys/{id}/origins":{"put":{"tags":["Environment › Publishable keys"],"summary":"Replace the exact list of origins allowed to present a publishable frontend key. Live on the next request.","description":"Requires scope `frontend_keys:write`. Danger: write.","operationId":"environment_frontend_keys_set_origins","x-action":"frontend_keys.set_origins","x-scope":"frontend_keys:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The key's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"origins":{"type":"array","description":"The exact origins (scheme, host, port) allowed to present the key, for example https://app.example.com. At least one.","minItems":1,"maxItems":50,"items":{"type":"string","maxLength":255}}},"required":["origins"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FrontendKey"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/hooks":{"get":{"tags":["Environment › Hooks"],"summary":"List the hooks — endpoints called during sign-in and token issuance — with their hook point, owner and whether each is active.","description":"Requires scope `hooks:read`. Danger: read.","operationId":"environment_hooks_list","x-action":"hooks.list","x-scope":"hooks:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InlineHook"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Hooks"],"summary":"Register a hook at a hook point (token minting, login, registration, password change). Returns its signing secret once.","description":"Requires scope `hooks:write`. Danger: critical.","operationId":"environment_hooks_create","x-action":"hooks.create","x-scope":"hooks:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hook_point":{"type":"string","description":"When it is called.","enum":["token_minting","post_login","pre_registration","post_registration","pre_password_change","post_password_change"]},"url":{"type":"string","description":"A public HTTPS URL, called in the middle of the operation.","format":"uri","maxLength":500},"organization_id":{"type":["string","null"],"description":"The organization it belongs to; it carries that organization's traffic only. Send this or environment_wide.","maxLength":64},"environment_wide":{"type":"boolean","description":"True to make it the environment's own, carrying EVERY organization's traffic. Send this or organization_id."}},"required":["hook_point","url"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/InlineHook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/hooks/{id}":{"get":{"tags":["Environment › Hooks"],"summary":"Get one hook: its URL, hook point, owner and whether it is active. Never its signing secret.","description":"Requires scope `hooks:read`. Danger: read.","operationId":"environment_hooks_get","x-action":"hooks.get","x-scope":"hooks:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The hook id."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/InlineHook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Hooks"],"summary":"Pause (active: false) or activate (active: true) a hook.","description":"Requires scope `hooks:write`. Danger: critical.","operationId":"environment_hooks_update","x-action":"hooks.update","x-scope":"hooks:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The hook id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","description":"True to call it at its hook point; false to pause it."}},"required":["active"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/InlineHook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Hooks"],"summary":"Remove a hook. It is no longer called at its hook point.","description":"Requires scope `hooks:write`. Danger: destructive.","operationId":"environment_hooks_delete","x-action":"hooks.delete","x-scope":"hooks:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The hook id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/invitations":{"get":{"tags":["Organization › Team"],"summary":"List pending invitations","operationId":"organization_team_invitations_list","x-action":"team.invitations.list","description":"Requires scope `team:read` and the `read-members` capability. The team's invitations nobody has accepted yet, newest first (at most 100).","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TeamInvitation"}}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-scope":"id:members:read","x-scope-aliases":["team:read"],"x-danger":"read"}},"/v1/invitations/{id}":{"delete":{"tags":["Organization › Team"],"summary":"Withdraw an invitation","description":"Requires scope `team:write` and the `manage-members` capability. The link stops working. An invitation that is not pending in this organization is a `404`.","operationId":"organization_team_invitations_revoke","x-action":"team.invitations.revoke","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"204":{"description":"Withdrawn"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-scope":"id:members:write","x-scope-aliases":["team:write"],"x-danger":"destructive"}},"/v1/invitations/{id}/resend":{"post":{"tags":["Organization › Team"],"summary":"Re-send an invitation","description":"Requires scope `team:write` and the `manage-members` capability. Mails a fresh link; the earlier link stops\nworking and the invitation gets a new `id`. At most once a minute per address\n(`429`, `too_soon`). If the mail server refuses, the earlier invitation is kept (`503`).\n","operationId":"organization_team_invitations_resend","x-action":"team.invitations.resend","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Sent again","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TeamInvitationReceipt"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"429":{"description":"Sent less than a minute ago (`too_soon`), or the key's rate limit is exhausted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"$ref":"#/components/responses/OrganizationMailFailed"}},"x-scope":"id:members:write","x-scope-aliases":["team:write"],"x-danger":"write"}},"/v1/legacy-login":{"get":{"tags":["Environment › Legacy login"],"summary":"Read the legacy login endpoint an app declared for migration, and whether it is approved to receive sign-ins.","description":"Requires scope `signin:read`. Danger: read.","operationId":"environment_legacy_login_get","x-action":"legacy_login.get","x-scope":"signin:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LegacyLogin"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/legacy-login/approve":{"post":{"tags":["Environment › Legacy login"],"summary":"Approve the declared legacy login endpoint: sign-ins for people not yet migrated, with their passwords, go to that URL.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_legacy_login_approve","x-action":"legacy_login.approve","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LegacyLogin"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/legacy-login/probe":{"post":{"tags":["Environment › Legacy login"],"summary":"Ask the declared legacy login endpoint whether it knows an address — your own — to test it before approving. Sends no password.","description":"Requires scope `signin:write`. Danger: write.","operationId":"environment_legacy_login_probe","x-action":"legacy_login.probe","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"An address that exists in your old system — your own.","format":"email","maxLength":254}},"required":["email"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LegacyLoginProbe"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/legacy-login/revoke":{"post":{"tags":["Environment › Legacy login"],"summary":"Withdraw the legacy login approval. People not yet migrated can no longer sign in; the declaration stays on file.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_legacy_login_revoke","x-action":"legacy_login.revoke","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LegacyLogin"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/log-streams":{"get":{"tags":["Environment › Log streams"],"summary":"List the SIEM destinations this environment's audit trail is streamed to, and whether each is enabled. Never a secret.","description":"Requires scope `log_streams:read`. Danger: read.","operationId":"environment_log_streams_list","x-action":"log_streams.list","x-scope":"log_streams:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LogStream"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Log streams"],"summary":"Stream the audit trail to a SIEM (Splunk, Elastic, Graylog, CEF, JSON), Datadog, or an S3 or GCS bucket. A generated HMAC key is returned once.","description":"Requires scope `log_streams:write`. Danger: critical.","operationId":"environment_log_streams_create","x-action":"log_streams.create","x-scope":"log_streams:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":190},"destination":{"type":"string","enum":["splunk_hec","elastic_ecs","graylog_gelf","cef_http","generic_json","datadog","s3","gcs"]},"endpoint_url":{"type":["string","null"],"description":"An HTTP collector: the public URL entries are POSTed to (required). Datadog, S3 and GCS: leave out for the destination's own endpoint, or an https URL of an S3-compatible store (MinIO, R2).","format":"uri","maxLength":2048},"auth":{"type":"string","description":"An HTTP collector: how the endpoint is authenticated. Left out, the destination's default. The cloud destinations authenticate their own way.","enum":["none","bearer","splunk","hmac"]},"secret":{"type":["string","null"],"description":"The credential, never echoed: the bearer or Splunk token (HTTP collectors; left out with `hmac`, a key is generated and returned once), the Datadog API key, the S3 secret access key (none with `role_arn`), or the GCS service-account JSON key.","maxLength":8192},"options":{"type":"object","description":"Datadog, S3 and GCS only: the destination's settings. An HTTP collector takes none.","properties":{"site":{"type":["string","null"],"description":"Datadog: the site your account lives on — the domain you sign in at, e.g. `datadoghq.eu` for EU1. Default `datadoghq.com` (US1). An API key only works on its own site.","enum":["datadoghq.com","us3.datadoghq.com","us5.datadoghq.com","datadoghq.eu","ap1.datadoghq.com","ap2.datadoghq.com","ddog-gov.com"]},"service":{"type":["string","null"],"description":"Datadog: the `service` attribute on every entry. Default: this platform's name.","maxLength":100},"source":{"type":["string","null"],"description":"Datadog: the `ddsource` attribute. Default `cbox`.","maxLength":100},"tags":{"type":["array","null"],"description":"Datadog: `key:value` tags (`ddtags`) on every entry, e.g. `env:prod`.","maxItems":100,"items":{"type":"string","maxLength":200}},"hostname":{"type":["string","null"],"description":"Datadog: the `hostname` attribute. Default: this platform's host.","maxLength":255},"bucket":{"type":["string","null"],"description":"S3 and GCS: the bucket objects are written to.","maxLength":222},"region":{"type":["string","null"],"description":"S3: the bucket's AWS Region, e.g. `eu-west-1` (`auto` for Cloudflare R2).","maxLength":32},"prefix":{"type":["string","null"],"description":"S3 and GCS: the object key prefix, e.g. `cbox/audit`. Objects are written to `{prefix}/{yyyy}/{mm}/{dd}/{hh}/{batch}.ndjson.gz`.","maxLength":512},"access_key_id":{"type":["string","null"],"description":"S3 with an access key: the IAM access key ID. Its secret access key is the stream's `secret`.","maxLength":128},"role_arn":{"type":["string","null"],"description":"S3 with an assumed role: the IAM role the platform assumes. No secret is stored; the role's trust policy must require the stream's `external_id`.","maxLength":2048},"sse":{"type":["string","null"],"description":"S3: server-side encryption requested on every object. Left out, the bucket's default.","enum":["AES256","aws:kms"]},"kms_key_id":{"type":["string","null"],"description":"S3 with `aws:kms`: the KMS key ID, alias or ARN.","maxLength":2048},"path_style":{"type":["boolean","null"],"description":"S3: path-style addressing. Default: virtual-hosted on AWS, path-style on a custom endpoint (MinIO, R2)."},"gzip":{"type":["boolean","null"],"description":"S3 and GCS: gzip each object (`.ndjson.gz`). Default true."}}},"organization_id":{"type":["string","null"],"description":"The organization it belongs to; it carries that organization's traffic only. Send this or environment_wide.","maxLength":64},"environment_wide":{"type":"boolean","description":"True to make it the environment's own, carrying EVERY organization's traffic. Send this or organization_id."}},"required":["name","destination"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LogStream"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/log-streams/{id}":{"get":{"tags":["Environment › Log streams"],"summary":"Get one audit log stream: destination, endpoint, auth scheme, owner and health. Never its secret.","description":"Requires scope `log_streams:read`. Danger: read.","operationId":"environment_log_streams_get","x-action":"log_streams.get","x-scope":"log_streams:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The log stream id."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LogStream"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Log streams"],"summary":"Change an audit log stream's name, destination, endpoint, options or credential (re-validated; resets its circuit breaker), or disable (enabled: false) / resume (enabled: true) it.","description":"Requires scope `log_streams:write`. Danger: critical.","operationId":"environment_log_streams_update","x-action":"log_streams.update","x-scope":"log_streams:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The log stream id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":190},"destination":{"type":"string","description":"Changing it starts the stream's options and credential afresh.","enum":["splunk_hec","elastic_ecs","graylog_gelf","cef_http","generic_json","datadog","s3","gcs"]},"endpoint_url":{"type":["string","null"],"description":"An HTTP collector's URL; for Datadog, S3 and GCS empty means the destination's own endpoint.","format":"uri","maxLength":2048},"auth":{"type":"string","description":"An HTTP collector only.","enum":["none","bearer","splunk","hmac"]},"secret":{"type":["string","null"],"description":"A new credential (token, API key, secret access key or service-account JSON key). Left out, the current one is kept. Never echoed.","maxLength":8192},"options":{"type":"object","description":"Datadog, S3 and GCS only: the destination's settings. An HTTP collector takes none.","properties":{"site":{"type":["string","null"],"description":"Datadog: the site your account lives on — the domain you sign in at, e.g. `datadoghq.eu` for EU1. Default `datadoghq.com` (US1). An API key only works on its own site.","enum":["datadoghq.com","us3.datadoghq.com","us5.datadoghq.com","datadoghq.eu","ap1.datadoghq.com","ap2.datadoghq.com","ddog-gov.com"]},"service":{"type":["string","null"],"description":"Datadog: the `service` attribute on every entry. Default: this platform's name.","maxLength":100},"source":{"type":["string","null"],"description":"Datadog: the `ddsource` attribute. Default `cbox`.","maxLength":100},"tags":{"type":["array","null"],"description":"Datadog: `key:value` tags (`ddtags`) on every entry, e.g. `env:prod`.","maxItems":100,"items":{"type":"string","maxLength":200}},"hostname":{"type":["string","null"],"description":"Datadog: the `hostname` attribute. Default: this platform's host.","maxLength":255},"bucket":{"type":["string","null"],"description":"S3 and GCS: the bucket objects are written to.","maxLength":222},"region":{"type":["string","null"],"description":"S3: the bucket's AWS Region, e.g. `eu-west-1` (`auto` for Cloudflare R2).","maxLength":32},"prefix":{"type":["string","null"],"description":"S3 and GCS: the object key prefix, e.g. `cbox/audit`. Objects are written to `{prefix}/{yyyy}/{mm}/{dd}/{hh}/{batch}.ndjson.gz`.","maxLength":512},"access_key_id":{"type":["string","null"],"description":"S3 with an access key: the IAM access key ID. Its secret access key is the stream's `secret`.","maxLength":128},"role_arn":{"type":["string","null"],"description":"S3 with an assumed role: the IAM role the platform assumes. No secret is stored; the role's trust policy must require the stream's `external_id`.","maxLength":2048},"sse":{"type":["string","null"],"description":"S3: server-side encryption requested on every object. Left out, the bucket's default.","enum":["AES256","aws:kms"]},"kms_key_id":{"type":["string","null"],"description":"S3 with `aws:kms`: the KMS key ID, alias or ARN.","maxLength":2048},"path_style":{"type":["boolean","null"],"description":"S3: path-style addressing. Default: virtual-hosted on AWS, path-style on a custom endpoint (MinIO, R2)."},"gzip":{"type":["boolean","null"],"description":"S3 and GCS: gzip each object (`.ndjson.gz`). Default true."}}},"enabled":{"type":"boolean","description":"True to deliver; false to stop, keeping what is pending."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LogStream"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Log streams"],"summary":"Delete an audit log stream. Nothing more is delivered to its endpoint.","description":"Requires scope `log_streams:write`. Danger: destructive.","operationId":"environment_log_streams_delete","x-action":"log_streams.delete","x-scope":"log_streams:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The log stream id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/log-streams/{id}/test":{"post":{"tags":["Environment › Log streams"],"summary":"Send one test event to a log stream now and report whether the destination accepted it, and if not, why.","description":"Requires scope `log_streams:write`. Danger: write.","operationId":"environment_log_streams_test","x-action":"log_streams.test","x-scope":"log_streams:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The log stream's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LogStreamTest"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me/api-keys":{"post":{"tags":["Account › API keys"],"summary":"Create an API key of your own for one of this environment's apps, in an organization you belong to. The value is returned once, as `token`.","description":"Requires scope `account:api_keys:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.","operationId":"account_account_api_keys_create","x-action":"account.api_keys.create","x-scope":"account:api_keys:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"required":true,"schema":{"type":"string"},"name":"organization_id","in":"query"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"The app this key is for.","maxLength":255},"name":{"type":"string","maxLength":120},"permissions":{"type":"array","description":"What the key may do in the app — each one a permission you hold there. Empty: it only identifies you.","maxItems":200,"items":{"type":"string","minLength":1,"maxLength":255}},"expires_at":{"type":["string","null"],"description":"When it stops working. Left out, it does not expire.","format":"date-time"}},"required":["client_id","name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PersonalApiKey"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/api-keys/{id}":{"delete":{"tags":["Account › API keys"],"summary":"Revoke one of your own API keys.","description":"Requires scope `account:api_keys:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.","operationId":"account_account_api_keys_revoke","x-action":"account.api_keys.revoke","x-scope":"account:api_keys:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"required":true,"schema":{"type":"string"},"name":"organization_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/applications/{id}":{"delete":{"tags":["Account › Applications"],"summary":"Withdraw an application's access to your account; it must ask you again to act as you.","description":"Requires scope `account:applications:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.","operationId":"account_account_applications_revoke","x-action":"account.applications.revoke","x-scope":"account:applications:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/approvals":{"get":{"tags":["Environment › Approvals"],"summary":"List pending agent approval requests","description":"Requires scope `approvals.read`. The same pending CIBA requests the console's\napprovals page shows, for the signed-in subject only.\n","security":[{"AuthenticatorToken":[]}],"parameters":[{"name":"cursor","in":"query","description":"The previous page's next_cursor; requests are ordered by descending ULID.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Approval"}}}}]}}}},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"$ref":"#/components/responses/BearerForbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/me/approvals/{id}":{"get":{"tags":["Environment › Approvals","Account › Approvals"],"summary":"Read one pending approval request","description":"Requires scope `approvals.read`. This is where `binding_message` is obtained. It\nis deliberately absent from the push payload — a lock screen is readable by\nanyone holding the phone, and the binding message is the transaction description\nCIBA exists to protect — so the app must call this after a notification tap and\nrender only what it returns.\n\n\nWhere an approval you asked for stands: The `poll_url` of a `202 approval_required`: an approval this token raised, and only those — another token's id is a 404. `status` is `pending`, `approved`, `denied`, `expired` or `consumed`.","security":[{"AuthenticatorToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Approval"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"$ref":"#/components/responses/BearerForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/me/approvals/{id}/approve":{"post":{"tags":["Environment › Approvals"],"summary":"Approve a pending agent request","description":"Requires scope `approvals.write`. The approving subject is taken from the access\ntoken, never the body — that binding is the consent step, and the server refuses\na mismatch.\n","security":[{"AuthenticatorToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Approved.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApprovalDecision"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"$ref":"#/components/responses/BearerForbidden"},"409":{"$ref":"#/components/responses/ApprovalNotActionable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/me/approvals/{id}/deny":{"post":{"tags":["Environment › Approvals"],"summary":"Deny a pending agent request","description":"Requires scope `approvals.write`.","security":[{"AuthenticatorToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["not_me"]}}}}}},"responses":{"200":{"description":"Denied.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApprovalDecision"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"$ref":"#/components/responses/BearerForbidden"},"409":{"$ref":"#/components/responses/ApprovalNotActionable"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/me/apps":{"get":{"tags":["Account › App catalog"],"summary":"List the published apps visible to you in this environment. Optional organization context must be one you actively belong to.","description":"Requires scope `account:apps:read` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: read.","operationId":"account_account_apps_list","x-action":"account.apps.list","x-scope":"account:apps:read","x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"maxLength":64}},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","required":["key","name","description","launch_url","icon_url","icon_dark_url","position","version"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"launch_url":{"type":"string","format":"uri"},"icon_url":{"type":["string","null"]},"icon_dark_url":{"type":["string","null"],"description":"Icon for dark surfaces. Null when the app has no dark icon; use icon_url in both themes."},"purpose":{"type":["string","null"],"description":"One line under the name in the app switcher."},"hue":{"type":["string","null"],"description":"The cbox-ui hue token the tile is drawn in, such as violet or amber."},"available":{"type":"boolean","description":"Always true here; the apps listed in meta.unavailable carry false."},"position":{"type":"integer"},"version":{"type":"integer"}}}}}}]}}}},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}},"x-scope-aliases":[]}},"/v1/me/authenticator":{"get":{"operationId":"environment_authenticatorIdentity","tags":["Environment › Devices"],"summary":"Verified identity for the authenticator","description":"Requires the provisioned public authenticator client, devices.manage and a DPoP proof. Available before device registration; revoked keys are refused.","responses":{"200":{"description":"The signed-in subject and display label.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["subject","label"],"properties":{"subject":{"type":"string"},"label":{"type":"string"}}},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"parameters":[]}},"/v1/me/devices/{id}":{"delete":{"tags":["Account › Devices"],"summary":"Remove one of your trusted devices; it is no longer asked to approve anything.","description":"Requires scope `account:devices:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.","operationId":"account_account_devices_remove","x-action":"account.devices.remove","x-scope":"account:devices:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/email/confirmation":{"post":{"tags":["Account › Profile"],"summary":"Mail yourself a link that confirms your email address.","description":"Requires scope `account:profile:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: write.","operationId":"account_account_email_confirmation_send","x-action":"account.email.confirmation.send","x-scope":"account:profile:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/mfa/sms":{"delete":{"tags":["Account › Sign-in methods"],"summary":"Remove your phone number for text-message sign-in codes.","description":"Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.","operationId":"account_account_mfa_sms_remove","x-action":"account.mfa.sms.remove","x-scope":"account:sign_in:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/organizations/{id}/leave":{"post":{"tags":["Account › Organizations"],"summary":"Leave one of your own organizations. The last owner cannot leave — transfer ownership first.","description":"Requires scope `account:organizations:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.","operationId":"account_account_organizations_leave","x-action":"account.organizations.leave","x-scope":"account:organizations:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The organization you are leaving — one you are a member of.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/passkeys/{id}":{"patch":{"tags":["Account › Sign-in methods"],"summary":"Rename one of your passkeys.","description":"Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: write.","operationId":"account_account_passkeys_rename","x-action":"account.passkeys.rename","x-scope":"account:sign_in:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"What to call the passkey: one to 64 characters, no line breaks.","minLength":1,"maxLength":64}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Passkey"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}},"delete":{"tags":["Account › Sign-in methods"],"summary":"Remove one of your passkeys.","description":"Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.","operationId":"account_account_passkeys_remove","x-action":"account.passkeys.remove","x-scope":"account:sign_in:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/pipes/{id}":{"delete":{"tags":["Account › Connected services"],"summary":"Disconnect one of your connected services, revoking the access you gave it.","description":"Requires scope `account:pipes:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.","operationId":"account_account_pipes_disconnect","x-action":"account.pipes.disconnect","x-scope":"account:pipes:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The provider's key, for example `github`.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/profile":{"patch":{"tags":["Account › Profile"],"summary":"Change the display name on your own account.","description":"Requires scope `account:profile:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: write.","operationId":"account_account_profile_update","x-action":"account.profile.update","x-scope":"account:profile:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Your display name.","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Profile"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/services/{id}/join-waitlist":{"post":{"tags":["Account › Service waitlists"],"summary":"Join a published service waitlist with your verified email. Does not buy a plan or grant access.","description":"Requires scope `account:waitlists:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: write.","operationId":"account_account_waitlists_join","x-action":"account.waitlists.join","x-scope":"account:waitlists:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":["string","null"],"description":"An active team you belong to; required for feature waitlists.","maxLength":64},"interest":{"type":["string","null"],"description":"Feature updates or participation in a test group.","enum":["notify","test"]},"country":{"type":["string","null"],"description":"Optional two-letter country code.","maxLength":2},"answers":{"type":"object","description":"Answers by the programme’s question keys, at most 2000 characters each.","maximum":20,"properties":[]},"reference":{"type":"string","description":"A stable UUID for this signup attempt, also used for Billing idempotency.","format":"uuid","maxLength":36}},"required":["reference"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/services/{id}/leave-waitlist":{"post":{"tags":["Account › Service waitlists"],"summary":"Withdraw your own feature interest or beta application for a team. Active grants are managed by the service.","description":"Requires scope `account:waitlists:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: write.","operationId":"account_account_waitlists_leave","x-action":"account.waitlists.leave","x-scope":"account:waitlists:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"string","maxLength":64},"reference":{"type":"string","format":"uuid","maxLength":36}},"required":["organization","reference"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/sessions/revoke-others":{"post":{"tags":["Account › Sessions"],"summary":"Sign out every one of your sessions except the one you are using.","description":"Requires scope `account:sessions:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.","operationId":"account_account_sessions_revoke_others","x-action":"account.sessions.revoke_others","x-scope":"account:sessions:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SessionsRevoked"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/sessions/{id}":{"delete":{"tags":["Account › Sessions"],"summary":"Sign out one of your own sessions.","description":"Requires scope `account:sessions:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: destructive.","operationId":"account_account_sessions_revoke","x-action":"account.sessions.revoke","x-scope":"account:sessions:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/sign-in-methods/{id}":{"delete":{"tags":["Account › Sign-in methods"],"summary":"Disconnect one linked sign-in identity (Google, GitHub, …) from your account — never the last way you can sign in.","description":"Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.","operationId":"account_account_sign_in_methods_disconnect","x-action":"account.sign_in_methods.disconnect","x-scope":"account:sign_in:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The linked identity's id, as Account lists it."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/social/{id}":{"delete":{"tags":["Account › Sign-in methods"],"summary":"Disconnect a social account from yours — never the last way you can sign in.","description":"Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.","operationId":"account_account_social_unlink","x-action":"account.social.unlink","x-scope":"account:sign_in:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The provider's key, for example `google`."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/me/totp-factors/{id}":{"patch":{"tags":["Account › Sign-in methods"],"summary":"Rename one of your authenticator apps.","description":"Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: write.","operationId":"account_account_totp_rename","x-action":"account.totp.rename","x-scope":"account:sign_in:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}},"delete":{"tags":["Account › Sign-in methods"],"summary":"Remove one of your authenticator apps.","description":"Requires scope `account:sign_in:write` on an access token you delegated; it acts on your own account only. No management key is accepted. Danger: critical.","operationId":"account_account_totp_remove","x-action":"account.totp.remove","x-scope":"account:sign_in:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/AccountCboxApproval"}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/AccountApprovalRequired"},"401":{"$ref":"#/components/responses/AccountUnauthorized"},"403":{"$ref":"#/components/responses/AccountForbidden"},"404":{"$ref":"#/components/responses/AccountNotFound"},"409":{"$ref":"#/components/responses/AccountConflict"},"422":{"$ref":"#/components/responses/AccountUnprocessableEntity"},"429":{"$ref":"#/components/responses/AccountTooManyRequests"}}}},"/v1/members":{"get":{"tags":["Organization › Team"],"summary":"List members","operationId":"organization_team_list","x-action":"team.list","description":"Requires scope `team:read` and the `read-members` capability (`members:read` for human members, or current ownership). The roster contains personal information; a machine key also needs an explicit role allowing member reads.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMember"}}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-scope":"id:members:read","x-scope-aliases":["team:read"],"x-danger":"read"},"post":{"tags":["Organization › Team"],"summary":"Invite a member","description":"Requires scope `team:write` and the `manage-members` capability (`members:manage` for human members, or current ownership). Invites the address onto the\nID product team with the selected app roles. Existing shared membership and other\napps are preserved. Owner is never invited; ownership is transferred separately. An\nearlier pending invitation for the same address and this app is superseded. List, re-send and\nwithdraw it under `/workspace/invitations`.\n","operationId":"organization_team_invite","x-action":"team.invite","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","roles"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":["string","null"]},"roles":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["admin","developer","billing","viewer"]}}}}}}},"responses":{"201":{"description":"Invited","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TeamInvitationReceipt"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"422":{"description":"Validation failed, or the email already belongs to a member","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/OrganizationMailFailed"}},"x-scope":"id:members:write","x-scope-aliases":["team:write"],"x-danger":"write"}},"/v1/members/{id}":{"delete":{"tags":["Organization › Team"],"summary":"Remove native ID app roles while preserving shared organization membership and other apps. The current owner cannot be removed.","description":"Requires scope `id:members:write` (until v3.1 also accepted as `team:write`) and a role that may `manage-members`. Danger: destructive.","operationId":"organization_team_remove","x-action":"team.remove","x-scope":"id:members:write","x-scope-aliases":["team:write"],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"roles_version":{"type":"string"}},"required":["roles_version"]}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"patch":{"tags":["Organization › Team"],"summary":"Set which of the organization's environments a team member reaches: all of them, or the listed ones.","description":"Requires scope `id:members:write` (until v3.1 also accepted as `team:write`) and a role that may `manage-members`. Danger: write.\n\nReplace native ID app roles atomically. Shared organization membership is preserved.: Requires scope `id:members:write` (until v3.1 also accepted as `team:write`) and a role that may `manage-members`. Danger: write.","operationId":"organization_team_environment_access","x-action":"team.environment_access","x-scope":"id:members:write","x-scope-aliases":["team:write"],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"environment_access_version":{"type":"string"},"all_environments":{"type":"boolean","description":"True: every environment, including ones created later."},"environment_ids":{"type":"array","description":"With `all_environments` false: the environments they reach.","items":{"type":"string","maxLength":64}},"roles":{"type":"array","items":{"type":"string","enum":["viewer","developer","billing","admin"]}},"roles_version":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OrganizationMember"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[]}},"/v1/members/{id}/transfer-ownership":{"post":{"tags":["Organization › Team"],"summary":"Transfer shared organization ownership. Existing app roles are preserved; the previous owner may lose native ID access. Only the current owner, signed in, may do this.","description":"Requires scope `id:members:write` (until v3.1 also accepted as `team:write`) and a role that may `manage-members`. Danger: critical.","operationId":"organization_team_transfer_ownership","x-action":"team.transfer_ownership","x-scope":"id:members:write","x-scope-aliases":["team:write"],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/onboarding":{"get":{"tags":["Environment › Onboarding"],"summary":"Read current environment onboarding evidence. Does not certify application security or production readiness.","description":"Requires scope `signin:read`. Danger: read.","operationId":"environment_onboarding_get","x-action":"onboarding.get","x-scope":"signin:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OnboardingProgress"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization":{"get":{"tags":["Organization › Organization"],"summary":"Get the organization","operationId":"organization_organization_get","x-action":"organization.get","description":"Requires scope `workspace:read` and current organization access. Returns only the organization identity and status, including for members with only the Billing app role.","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OrganizationOrganization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"id:organization:read","x-scope-aliases":["workspace:read"],"x-danger":"read","x-action-aliases":["workspace.get"]},"patch":{"tags":["Organization › Organization"],"summary":"Rename the organization.","description":"Requires scope `id:organization:write` (until v3.1 also accepted as `settings:write`) and a role that may `own-organization` and `manage-members`. Danger: write.","operationId":"organization_organization_settings_update","x-action":"organization.settings.update","x-scope":"id:organization:write","x-scope-aliases":["settings:write"],"x-danger":"write","x-action-aliases":["workspace.settings.update"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OrganizationOrganization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/organization-domains":{"get":{"tags":["Environment › Enterprise SSO"],"summary":"List the email domains organizations claimed for single sign-on, whether each is verified and captured, and the DNS record that proves an unverified one.","description":"Requires scope `sso:read`. Danger: read.","operationId":"environment_sso_domains_list","x-action":"sso.domains.list","x-scope":"sso:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only this organization's.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SsoDomain"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Enterprise SSO"],"summary":"Claim an email domain for an organization's single sign-on, and get the DNS TXT record to publish to prove it.","description":"Requires scope `sso:write`. Danger: write.","operationId":"environment_sso_domains_create","x-action":"sso.domains.create","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","description":"The organization claiming it.","maxLength":64},"domain":{"type":"string","description":"The email domain, e.g. acme.com.","maxLength":253}},"required":["organization_id","domain"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoDomain"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization-domains/{id}":{"delete":{"tags":["Environment › Enterprise SSO"],"summary":"Remove a claimed email domain. Its people stop being routed to the organization's SSO connection.","description":"Requires scope `sso:write`. Danger: destructive.","operationId":"environment_sso_domains_delete","x-action":"sso.domains.delete","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The domain's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Enterprise SSO"],"summary":"Turn capture on or off for a verified domain: captured, everyone with an address at it must sign in through the organization's SSO.","description":"Requires scope `sso:write`. Danger: critical.","operationId":"environment_sso_domains_capture","x-action":"sso.domains.capture","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The domain's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"capture":{"type":"boolean","description":"true to capture the domain, false to release it."},"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},"required":["capture"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoDomain"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization-domains/{id}/verify":{"post":{"tags":["Environment › Enterprise SSO"],"summary":"Check a claimed domain's DNS TXT record now. Answers the domain, with verified true once the record is found.","description":"Requires scope `sso:write`. Danger: write.","operationId":"environment_sso_domains_verify","x-action":"sso.domains.verify","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The domain's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoDomain"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization-invitations":{"get":{"operationId":"environment_invitations_list","x-action":"invitations.list","tags":["Environment › Invitations"],"summary":"List an organization's pending invitations","description":"Requires scope `invitations:read`. Pending and unexpired only.","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"invitations:read","x-scope-aliases":[],"x-danger":"read"},"post":{"operationId":"environment_invitations_send","x-action":"invitations.send","tags":["Environment › Invitations"],"summary":"Invite someone to the organization","description":"Requires scope `invitations:write`. Mails a link; the person joins when they open it\nand confirm. Inviting an address again replaces its earlier pending invitation.\n\n- `role` — `admin` or `member` (default `member`). Never `owner`.\n- `roles` — access roles granted when the invitation is accepted: role ids, or your\n app's manifest **keys** when `client_id` names the app that declared them. Only\n roles the organization's own administrators could grant are accepted: a **staff\n role** is refused (`422 role_not_assignable`) — grant it after they join, with\n `PUT …/members/{user_id}/roles/{role_id}`.\n- `client_id` + `return_to` — after accepting, the person is sent to `return_to`,\n which must be on one of that app's registered redirect-URI origins (checked again\n when the invitation is accepted).\n- `inviter_name` — who the mail says it is from. Defaults to the app's name, or the\n environment's.\n\nRefusals: `409 already_member`, `409 access_role_conflict` (segregation of duties),\n`422 unknown_role`, `422 role_not_assignable`, `422 unknown_app`,\n`422 return_without_app`, `422 return_to_malformed`, `422 return_to_not_registered`,\n`503 mail_failed` (nothing was created — retry).\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":190},"role":{"$ref":"#/components/schemas/AssignableMemberRole"},"roles":{"type":"array","maxItems":50,"items":{"type":"string"}},"client_id":{"type":["string","null"]},"return_to":{"type":["string","null"],"format":"uri","maxLength":2048},"inviter_name":{"type":["string","null"],"maxLength":120}}}}}},"responses":{"201":{"description":"Sent.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Invitation"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/MailFailed"}},"x-scope":"invitations:write","x-scope-aliases":[],"x-danger":"write"}},"/v1/organization-invitations/{id}":{"get":{"tags":["Environment › Invitations"],"summary":"Get an invitation and its acceptance receipt, confined to its organization.","description":"Requires scope `invitations:read`. Danger: read.","operationId":"environment_invitations_get","x-action":"invitations.get","x-scope":"invitations:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"required":true,"schema":{"type":"string","description":"The organization id.","maxLength":64},"name":"organization_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The invitation id.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Invitation"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"environment_invitations_revoke","x-action":"invitations.revoke","tags":["Environment › Invitations"],"summary":"Withdraw a pending invitation","description":"Requires scope `invitations:write`. The link stops working, and the roles parked\nfor it go with it. `409 not_pending` for one already accepted, withdrawn or expired.\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Withdrawn."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"invitations:write","x-scope-aliases":[],"x-danger":"destructive"}},"/v1/organization-invitations/{id}/resend":{"post":{"operationId":"environment_invitations_resend","x-action":"invitations.resend","tags":["Environment › Invitations"],"summary":"Mail a pending invitation again","description":"Requires scope `invitations:write`. On a **fresh link**: only a hash of the old one is\nkept, so it cannot be re-sent, and the reason people ask is usually that it expired.\nThe response is the NEW invitation — its `id` replaces the old one, which stops\nworking. Its roles and app context move with it.\n\nOne re-send per address per minute (`429 too_soon`); `409 not_pending` for one that\nwas accepted, withdrawn or has expired; `503 mail_failed` keeps the invitation.\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"Sent again.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Invitation"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/MailFailed"}},"x-scope":"invitations:write","x-scope-aliases":[],"x-danger":"write"}},"/v1/organization-keys":{"get":{"tags":["Organization › Keys"],"summary":"List the organization's keys, newest first, revoked ones included — names, roles, scopes and expiry, never their values.","description":"Requires scope `id:organization:read` (until v3.1 also accepted as `workspace:read`) and a role that may `manage-members`. Danger: read.","operationId":"organization_keys_organization_list","x-action":"keys.organization.list","x-scope":"id:organization:read","x-scope-aliases":["workspace:read"],"x-danger":"read","x-action-aliases":["keys.workspace.list"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","description":"The page to read, from 1. A list says `next_page` when there is one."}},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceKey"}}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Organization › Keys"],"summary":"Mint an organization key with a role and optional scopes, never wider than the caller. The value is returned once, as `token`.","description":"Requires scope `id:organization-keys:write` (until v3.1 also accepted as `keys:write`) and a role that may `manage-environments` and `manage-members`. Danger: critical.","operationId":"organization_keys_organization_create","x-action":"keys.organization.create","x-scope":"id:organization-keys:write","x-scope-aliases":["keys:write"],"x-danger":"critical","x-action-aliases":["keys.workspace.create"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"role":{"type":"string","enum":["admin","developer","member","viewer"]},"scopes":{"type":["array","null"],"description":"Narrow the key below its role. Left out, the role alone bounds it — or, minted by a key with scopes, that key's scopes.","minItems":1,"items":{"type":"string","enum":["id:organization:read","workspace:read","id:projects:write","projects:write","id:environments:write","environments:write","id:members:read","team:read","id:members:write","team:write","id:environment-keys:write","keys:write","id:organization-keys:write","id:billing:write","billing:write","id:organization:write","settings:write"]}},"expires_at":{"type":["string","null"],"description":"When it stops working. Left out, it does not expire — or, minted by a key that does, expires with it.","format":"date-time"}},"required":["name","role"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WorkspaceKey"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization-keys/{id}":{"delete":{"tags":["Organization › Keys"],"summary":"Revoke an organization key, and every key it minted on either plane (organization keys and environment management keys, all the way down); whatever uses them stops immediately.","description":"Requires scope `id:organization-keys:write` (until v3.1 also accepted as `keys:write`) and a role that may `manage-environments` and `manage-members`. Danger: destructive.","operationId":"organization_keys_organization_revoke","x-action":"keys.organization.revoke","x-scope":"id:organization-keys:write","x-scope-aliases":["keys:write"],"x-danger":"destructive","x-action-aliases":["keys.workspace.revoke"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization-memberships":{"get":{"operationId":"environment_members_list","x-action":"members.list","tags":["Environment › Members"],"summary":"List an organization's members","description":"Requires scope `members:read`. Every membership, whatever its status, oldest first.","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"members:read","x-scope-aliases":[],"x-danger":"read"},"post":{"operationId":"environment_members_add","x-action":"members.add","tags":["Environment › Members"],"summary":"Add an existing user as a member","description":"Requires scope `members:write`. Straight in — no invitation, no mail. Name the user by\n`user_id` or by `email`; they must exist in this environment (`422 user_not_found`).\nA suspended or archived organization takes no new members (`409 organization_inactive`).\n\n`roles` grants access roles at the same time — ids, or your app's manifest keys with\n`client_id` — with the environment's authority (staff roles included). One the\norganization cannot hold is `422 role_not_assignable`; a segregation-of-duties\nconflict is `409 role_conflict`, and nothing is added.\n\n`role` is `admin` or `member` (default `member`). `owner` is never assignable:\nownership moves with `transfer-ownership`.\n\n**Idempotent for the same role**: repeating the request answers `200` with the\nexisting membership. A member on a *different* role is `409 already_member` — change\nthe role with `PATCH`.\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"email":{"type":"string","format":"email","description":"Instead of `user_id`."},"role":{"$ref":"#/components/schemas/AssignableMemberRole"},"roles":{"type":"array","maxItems":50,"items":{"type":"string"}},"client_id":{"type":["string","null"],"description":"The app whose manifest keys `roles` are."}}}}}},"responses":{"200":{"description":"Already a member with that role — nothing changed.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Member"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"201":{"description":"Added.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Member"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"members:write","x-scope-aliases":[],"x-danger":"write"}},"/v1/organization-memberships/{id}":{"patch":{"operationId":"environment_members_update","x-action":"members.update","tags":["Environment › Members"],"summary":"Change a member's role","description":"Requires scope `members:write`. `role` is `admin` or `member`. Demoting the only\nowner is refused with `409 last_owner` — transfer ownership first.\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"role":{"$ref":"#/components/schemas/AssignableMemberRole"}}}}}},"responses":{"200":{"description":"The membership after the change.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Member"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"members:write","x-scope-aliases":[],"x-danger":"write"},"delete":{"operationId":"environment_members_remove","x-action":"members.remove","tags":["Environment › Members"],"summary":"Remove a member","description":"Requires scope `members:write`. The member's roles in the organization go with the\nmembership. Removing the only owner is refused with `409 last_owner`.\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Removed."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"members:write","x-scope-aliases":[],"x-danger":"destructive"}},"/v1/organization-memberships/{id}/app-roles":{"put":{"tags":["Environment › Roles"],"summary":"Replace one app's member roles atomically. Other apps and the organization membership remain unchanged. An empty role list removes this app's access only.","description":"Requires scope `roles:write`. Danger: write.","operationId":"environment_members_apps_roles_replace","x-action":"members.apps.roles.replace","x-scope":"roles:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"required":true,"schema":{"type":"string","maxLength":64},"name":"organization_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"required":true,"schema":{"type":"string","maxLength":255},"name":"client_id","in":"query"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string","description":"SHA-256 of the JSON array of current role ids for this app, sorted lexicographically. Read member roles first.","minLength":64,"maxLength":64},"roles":{"type":"array","description":"Manifest keys to assign. An empty list removes manual access to this app.","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":190}}},"required":["version","roles"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RoleAssignments"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/resend-verification":{"post":{"tags":["Organization › Projects"],"summary":"Re-send the signup confirmation the organization's first environment is waiting on, to the owner's address on file.","description":"Requires scope `id:projects:write` (until v3.1 also accepted as `projects:write`) and a role that may `manage-environments`. Danger: write.","operationId":"organization_projects_verification_resend","x-action":"projects.verification.resend","x-scope":"id:projects:write","x-scope-aliases":["projects:write"],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/VerificationResend"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organizations":{"get":{"operationId":"environment_organizations_list","x-action":"organizations.list","tags":["Environment › Organizations"],"summary":"List organizations","description":"Requires scope `organizations:read`. A page at a time, archived ones included. Narrow\nwith `q` (a fragment of the name or slug) or `status`.\n","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":190}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","suspended","deleted"]}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"400":{"$ref":"#/components/responses/EnvironmentRequired"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"organizations:read","x-scope-aliases":[],"x-danger":"read"},"post":{"operationId":"environment_organizations_create","x-action":"organizations.create","tags":["Environment › Organizations"],"summary":"Create an organization, optionally with its owner","description":"Requires scope `organizations:write`.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":190},"slug":{"type":["string","null"],"maxLength":190,"description":"URL-safe; unique within the environment. Optional — left out, it is derived\nfrom the name and made unique (`acme`, `acme-2`, …). **Send one if you\nretry creates**: with your own slug a retried request is a `422\nslug_taken` you can recognise, not a second organization.\n"},"parent_id":{"type":["string","null"],"description":"An organization in this environment to place it under (`422 parent_not_found` otherwise)."},"owner_user_id":{"type":["string","null"],"description":"An existing user of this environment who becomes the organization's\n**owner**, in the same transaction as the create (`422 user_not_found`\notherwise). Without it the organization starts with no owner; make one\nlater with `transfer-ownership`.\n"},"type":{"type":"string","enum":["customer","reseller"],"default":"customer","description":"`reseller` manages customer organizations beneath it in the tree; `customer` is a leaf tenant."},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string","maxLength":500},"description":"Free-form text values you keep on the organization."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Organization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"organizations:write","x-scope-aliases":[],"x-danger":"write"}},"/v1/organizations/{id}":{"get":{"operationId":"environment_organizations_get","x-action":"organizations.get","tags":["Environment › Organizations"],"summary":"Get an organization","description":"Requires scope `organizations:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Organization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"organizations:read","x-scope-aliases":[],"x-danger":"read"},"patch":{"operationId":"environment_organizations_update","x-action":"organizations.update","tags":["Environment › Organizations"],"summary":"Rename an organization, change its slug, or replace its metadata","description":"Requires scope `organizations:write`. A field left out is left alone; a request\nthat changes nothing answers with the organization as it is and records nothing.\nA change is announced as the `organization.updated` webhook and recorded on the\norganization's trail as `organization.renamed`, with the values before and after.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":190},"slug":{"type":"string","minLength":1,"maxLength":190,"description":"URL-safe; unique within the environment."},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string","maxLength":500},"description":"Replaces the metadata as a whole; `null` or `{}` clears it."}}}}}},"responses":{"200":{"description":"The organization after the change.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Organization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"organizations:write","x-scope-aliases":[],"x-danger":"write"},"delete":{"operationId":"environment_organizations_delete","x-action":"organizations.delete","tags":["Environment › Organizations"],"summary":"Archive an organization","description":"Requires scope `organizations:write`. **Archives** rather than erases: the status\nbecomes `deleted`, every member loses access from their next request, the rows stay\nfor the audit trail, and `organization.deleted` is announced. Idempotent — archiving\nan archived organization answers with it unchanged.\n\nRefused with `409 owns_products` for an organization that owns identity-provider\nprojects on this platform (a platform customer, not a tenant of your app).\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"The archived organization.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Organization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"organizations:write","x-scope-aliases":[],"x-danger":"destructive"}},"/v1/organizations/{id}/inherit-sign-in-policy":{"post":{"tags":["Environment › Sign-in"],"summary":"Drop one organization's authentication policy override, so it inherits the environment baseline again.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_policy_inherit","x-action":"signin.policy.inherit","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The organization whose override to drop.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organizations/{id}/reactivate":{"post":{"tags":["Environment › Organizations"],"summary":"Lift an organization's suspension so its members can sign in again.","description":"Requires scope `organizations:write`. Danger: write.","operationId":"environment_organizations_reactivate","x-action":"organizations.reactivate","x-scope":"organizations:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The organization id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Organization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organizations/{id}/suspend":{"post":{"tags":["Environment › Organizations"],"summary":"Suspend an organization: its members cannot sign in to it until it is reactivated.","description":"Requires scope `organizations:write`. Danger: write.","operationId":"environment_organizations_suspend","x-action":"organizations.suspend","x-scope":"organizations:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The organization id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Organization"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organizations/{id}/transfer-ownership":{"post":{"operationId":"environment_organizations_transfer_ownership","x-action":"organizations.transfer_ownership","tags":["Environment › Organizations"],"summary":"Make a member the organization's owner","description":"Requires scope `organizations:write`. The new owner must be an **active** member.\nWith one current owner this is a hand-over: the previous owner stays on as `admin`.\nAn organization with no owner (created without `owner_user_id`) gets its first; one\nwith several (from before ownership was transfer-only) ends with exactly one, the\nothers stepping down to `admin`.\n\nRefusals: `422 not_a_member`, `409 not_active`, `409 already_owner`.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":"string"}}}}}},"responses":{"200":{"description":"The new owner's membership.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Member"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"organizations:write","x-scope-aliases":[],"x-danger":"critical"}},"/v1/payment-methods/{id}":{"delete":{"tags":["Organization › Billing"],"summary":"Remove an unneeded payment card from this organization.","description":"Requires scope `id:billing:write` (until v3.1 also accepted as `billing:write`) and a role that may `manage-billing`. Danger: write.","operationId":"organization_billing_payment_method_remove","x-action":"billing.payment_method.remove","x-scope":"id:billing:write","x-scope-aliases":["billing:write"],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/payment-methods/{id}/make-default":{"post":{"tags":["Organization › Billing"],"summary":"Choose the organization default payment card.","description":"Requires scope `id:billing:write` (until v3.1 also accepted as `billing:write`) and a role that may `manage-billing`. Danger: write.","operationId":"organization_billing_payment_method_default","x-action":"billing.payment_method.default","x-scope":"id:billing:write","x-scope-aliases":["billing:write"],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":255}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/permissions":{"get":{"tags":["Environment › Roles"],"summary":"List the permission catalogue roles are composed from, a page at a time. Narrow by `client_id` (one app's), `organization_id` (what it can see) or a `q` fragment.","description":"Requires scope `roles:read`. Danger: read.","operationId":"environment_permissions_list","x-action":"permissions.list","x-scope":"roles:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"Also the permissions this organization authored for itself.","maxLength":64}},{"name":"client_id","in":"query","required":false,"schema":{"type":"string","description":"Only the permissions this app declared.","maxLength":255}},{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"Only permissions whose key or description contains this.","maxLength":120}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Roles"],"summary":"Author a manual `feature:action` permission, shared with the environment (organization_id null) or one organization's own.","description":"Requires scope `role_definitions:write`. Danger: write.","operationId":"environment_permissions_create","x-action":"permissions.create","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The key: a feature and an action joined by a colon, like invoices:create.","maxLength":120},"description":{"type":["string","null"],"maxLength":500},"organization_id":{"type":["string","null"],"description":"The organization it belongs to; null for the environment's shared tier.","maxLength":64},"tenant_assignable":{"type":"boolean","description":"Shared tier only: whether organizations may compose it into their own roles. Default false; always true on an organization's own."}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Permission"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/permissions/{id}":{"patch":{"tags":["Environment › Roles"],"summary":"Change a manual permission's description, and on the shared tier whether organizations may use it. The key itself never changes.","description":"Requires scope `role_definitions:write`. Danger: write.","operationId":"environment_permissions_update","x-action":"permissions.update","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The permission id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":["string","null"],"maxLength":500},"tenant_assignable":{"type":"boolean","description":"Shared tier only: whether organizations may compose it into their own roles."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Permission"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Roles"],"summary":"Delete a manual permission: every role carrying it loses it first.","description":"Requires scope `role_definitions:write`. Danger: destructive.","operationId":"environment_permissions_delete","x-action":"permissions.delete","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The permission id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/pipe-connections/{id}":{"delete":{"tags":["Environment › Pipes"],"summary":"Disconnect a person's connected account: revoke it at the provider where supported, revoke its tokens here, and forget it.","description":"Requires scope `pipes:write`. Danger: destructive.","operationId":"environment_pipes_connections_delete","x-action":"pipes.connections.delete","x-scope":"pipes:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"required":true,"schema":{"type":"string","description":"The pipe's id."},"name":"pipe_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/pipe-grants/{id}":{"delete":{"tags":["Environment › Pipes"],"summary":"Withdraw an app's right to lease the tokens people connected through this pipe.","description":"Requires scope `pipes:write`. Danger: destructive.","operationId":"environment_pipes_grants_delete","x-action":"pipes.grants.delete","x-scope":"pipes:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"required":true,"schema":{"type":"string","description":"The pipe's id."},"name":"pipe_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The OAuth client id whose grant is withdrawn.","maxLength":190}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/pipe-leases":{"post":{"tags":["Environment › Token Vault"],"summary":"Lease a fresh access token for a person's connected account (Pipes)","description":"Returns a working access token for one person's connected account at a\nthird-party provider (GitHub, Google, Microsoft 365, Slack, Salesforce, HubSpot,\nLinear, Notion), refreshing it first when it is about to expire. The app must be\ngranted the provider's pipe (Developers › Pipes); an app an organization owns may\nonly lease for that organization's members.\n\nWhose token: a token issued to the app FOR a person leases that person's\nconnection, and `user_id` may only repeat it; a client-credentials token names the\nperson in `user_id`. The response is `Cache-Control: no-store`. Drop the token\nwhen you are done and lease again next time.\n","security":[{"AgentToken":[]}],"parameters":[{"required":true,"description":"The provider's key.","schema":{"type":"string","enum":["github","google","microsoft","slack","salesforce","hubspot","linear","notion"]},"name":"provider","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["purpose"],"properties":{"purpose":{"type":"string","maxLength":200,"description":"Recorded on the audit trail."},"user_id":{"type":"string","maxLength":128,"description":"The person, for a token not issued for one. With a person's token, may only name that person."}}}}}},"responses":{"200":{"description":"A fresh access token.","headers":{"Cache-Control":{"schema":{"type":"string","example":"no-store"}}},"content":{"application/json":{"schema":{"type":"object","required":["access_token","token_type","provider","user_id","connection_id","scopes","lease_expires_at","metadata"],"properties":{"access_token":{"type":"string","description":"The provider's access token. Use it as a bearer token against the provider's API."},"token_type":{"type":"string","enum":["Bearer"]},"provider":{"type":"string"},"user_id":{"type":"string"},"connection_id":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"},"description":"What the person consented to."},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the PROVIDER stops accepting it. Null for tokens that do not expire."},"lease_expires_at":{"type":"string","format":"date-time","description":"When to drop it and lease again."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"What the app needs to call the API at all — Salesforce's `instance_url`, Slack's `team.id`, Notion's `workspace_id`. Never a credential."}}}}}},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"description":"Lease denied — the app is not granted this pipe, there is no such (enabled)\npipe, the person is not a member of the app's organization, or `user_id` names\nsomeone other than the token's person. One response, with a constant message.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The app is granted the pipe, and the person has not connected the provider. Send them to `connect_url`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The person must connect the provider again — it refused the refresh token, or the token expired with none. Send them to `connect_url`.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"A needed refresh could not complete right now. Retry after the `Retry-After` header.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/pipes":{"get":{"tags":["Environment › Pipes"],"summary":"List the pipes — the third-party providers people can connect their accounts to — with their scopes and the apps granted their tokens. Never a client secret.","description":"Requires scope `pipes:read`. Danger: read.","operationId":"environment_pipes_list","x-action":"pipes.list","x-scope":"pipes:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Pipe"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Pipes"],"summary":"Configure a pipe: the environment's OAuth app at a third-party provider (GitHub, Google, Microsoft 365, Slack, Salesforce, HubSpot, Linear, Notion), so people can connect their accounts. The client secret is sealed and never returned.","description":"Requires scope `pipes:write`. Danger: write.","operationId":"environment_pipes_create","x-action":"pipes.create","x-scope":"pipes:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"The provider's key.","enum":["github","google","microsoft","slack","salesforce","hubspot","linear","notion"]},"client_id":{"type":"string","description":"The OAuth client id of your app at the provider.","maxLength":500},"client_secret":{"type":"string","description":"Its client secret. Write-only: sealed, never returned.","maxLength":4000},"scopes":{"type":"array","description":"The OAuth scopes to ask people for. Left out: the provider's defaults.","items":{"type":"string","maxLength":190}},"parameters":{"type":"object","description":"Per-installation values some providers need. Left out: the provider's defaults.","properties":{"tenant":{"type":"string","description":"Microsoft 365 only: `common` (default), `organizations`, or one directory's tenant id or domain.","maxLength":253},"domain":{"type":"string","description":"Salesforce only: `login.salesforce.com` (default), `test.salesforce.com`, or your My Domain host.","maxLength":253}}}},"required":["provider","client_id","client_secret"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Pipe"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/pipes/{id}":{"get":{"tags":["Environment › Pipes"],"summary":"Show one pipe: its provider, OAuth client id, scopes, the redirect URI to register at the provider, and the apps granted its tokens.","description":"Requires scope `pipes:read`. Danger: read.","operationId":"environment_pipes_get","x-action":"pipes.get","x-scope":"pipes:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The pipe's id."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Pipe"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Pipes"],"summary":"Change a pipe — client id, client secret (sealed), scopes, parameters, or whether it is enabled. Only what is sent changes.","description":"Requires scope `pipes:write`. Danger: write.","operationId":"environment_pipes_update","x-action":"pipes.update","x-scope":"pipes:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The pipe's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"A new OAuth client id. Left out, unchanged.","maxLength":500},"client_secret":{"type":"string","description":"A new client secret, sealed. Left out, unchanged.","maxLength":4000},"scopes":{"type":"array","description":"The OAuth scopes to ask people for. Left out: the provider's defaults.","items":{"type":"string","maxLength":190}},"parameters":{"type":"object","description":"Per-installation values some providers need. Left out: the provider's defaults.","properties":{"tenant":{"type":"string","description":"Microsoft 365 only: `common` (default), `organizations`, or one directory's tenant id or domain.","maxLength":253},"domain":{"type":"string","description":"Salesforce only: `login.salesforce.com` (default), `test.salesforce.com`, or your My Domain host.","maxLength":253}}},"enabled":{"type":"boolean","description":"False refuses new connections and every lease. Left out, unchanged."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Pipe"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Pipes"],"summary":"Remove a pipe and every connection through it. Their tokens are revoked here, not at the provider — disconnect people first if that matters.","description":"Requires scope `pipes:write`. Danger: destructive.","operationId":"environment_pipes_delete","x-action":"pipes.delete","x-scope":"pipes:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The pipe's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/pipes/{id}/connections":{"get":{"tags":["Environment › Pipes"],"summary":"List the accounts people connected through a pipe: who, which account, granted scopes, status (active / needs_reauth) and when the token expires. Never a token.","description":"Requires scope `pipes:read`. Danger: read.","operationId":"environment_pipes_connections_list","x-action":"pipes.connections.list","x-scope":"pipes:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The pipe's id."}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","description":"Only this person's connection.","maxLength":128}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PipeConnection"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/pipes/{id}/grants":{"post":{"tags":["Environment › Pipes"],"summary":"Grant an app (by OAuth client id) the right to lease fresh access tokens for the accounts people connected through this pipe.","description":"Requires scope `pipes:write`. Danger: critical.","operationId":"environment_pipes_grants_create","x-action":"pipes.grants.create","x-scope":"pipes:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The pipe's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"The OAuth client id of an app in this environment.","maxLength":190}},"required":["client_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Pipe"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/portal-links":{"get":{"operationId":"environment_organizations_portal_links_list","x-action":"organizations.portal_links.list","x-scope":"portal_links:read","x-danger":"read","tags":["Environment › Admin Portal"],"summary":"List an organization's Admin Portal links","description":"Requires scope `portal_links:read`. Danger: read. The links minted in the last 30\ndays, newest first — every link that can still be opened is among them, since a link\nwaits a week at most. Each says what it opens, who minted it, whom it was mailed to\nand where it stands (`status`). Never the link itself: it was shown once, when it was\nminted, and only its hash is kept. Not paged.\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PortalLinkRecord"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope-aliases":[]},"post":{"tags":["Environment › Admin Portal"],"summary":"Create a one-time Admin Portal link an organization's IT administrator uses to set up SSO, directory sync, domain verification, log streams or SAML certificate renewal, or to read its audit logs, without an account. The URL is shown once.","description":"Requires scope `portal_links:write`. Danger: critical.","operationId":"environment_organizations_portal_links_create","x-action":"organizations.portal_links.create","x-scope":"portal_links:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"required":true,"schema":{"type":"string","description":"The organization the link sets up.","maxLength":64},"name":"organization_id","in":"query"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"intents":{"type":"array","description":"What the link may set up: sso (connection and email domains), dsync (directory sync over SCIM), domain_verification, log_streams, certificate_renewal (a SAML connection's signing certificate), audit_logs (the organization's audit events, read-only, with CSV export).","minItems":1,"items":{"type":"string","enum":["sso","dsync","domain_verification","log_streams","certificate_renewal","audit_logs"]}},"expires_in_minutes":{"type":["integer","null"],"description":"How long the link may wait to be opened, in minutes — 5 to 10080 (a week). Left out, the deployment's default (30).","minimum":5,"maximum":10080},"email":{"type":["string","null"],"description":"Mail the link to this address — the customer's IT contact. Left out, nothing is sent.","format":"email","maxLength":254},"locale":{"type":["string","null"],"description":"The language of that mail. Left out, the environment's default language.","enum":["en","da","de","sv","nb","fr","fi","es","it","nl","pt","pl","ro","cs","hu","el","bg","hr","sk","tr","uk"]}},"required":["intents"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PortalLink"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/portal-links/{id}":{"delete":{"tags":["Environment › Admin Portal"],"summary":"Withdraw an Admin Portal link: it can no longer be opened, and a setup session it already opened ends on its next request. What was already set up through it stays.","description":"Requires scope `portal_links:write`. Danger: destructive.","operationId":"environment_organizations_portal_links_revoke","x-action":"organizations.portal_links.revoke","x-scope":"portal_links:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"required":true,"schema":{"type":"string","description":"The organization id.","maxLength":64},"name":"organization_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The portal link's id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects":{"get":{"tags":["Organization › Projects"],"summary":"List projects","operationId":"organization_projects_list","x-action":"projects.list","description":"Requires scope `workspace:read` and permission to read environments. Human callers see only projects containing environments they may access; environment counts include only those environments. Billing-only members cannot list projects.","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"id:organization:read","x-scope-aliases":["workspace:read"],"x-danger":"read"},"post":{"tags":["Organization › Projects"],"summary":"Create a project","description":"Stand up another independently-billed IdP product. Requires scope `projects:write` and the `manage-environments` capability (`id:write` for human members, or current ownership).","operationId":"organization_projects_create","x-action":"projects.create","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":120},"environment_limit":{"type":"integer","minimum":1,"maximum":100,"description":"Optional lower per-project environment allowance. Defaults to the account's current Billing entitlement and cannot exceed it."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Project"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/AdmissionUnavailable"}},"x-scope":"id:projects:write","x-scope-aliases":["projects:write"],"x-danger":"write"}},"/v1/projects/{id}":{"patch":{"tags":["Organization › Projects"],"summary":"Rename a project.","description":"Requires scope `id:projects:write` (until v3.1 also accepted as `projects:write`) and a role that may `manage-environments`. Danger: write.","operationId":"organization_projects_rename","x-action":"projects.rename","x-scope":"id:projects:write","x-scope-aliases":["projects:write"],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Project"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{id}/reactivate":{"post":{"tags":["Organization › Projects"],"summary":"Reactivate a suspended project, so environments can be added to it again.","description":"Requires scope `id:projects:write` (until v3.1 also accepted as `projects:write`) and a role that may `manage-environments`. Danger: write.","operationId":"organization_projects_reactivate","x-action":"projects.reactivate","x-scope":"id:projects:write","x-scope-aliases":["projects:write"],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Project"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{id}/suspend":{"post":{"tags":["Organization › Projects"],"summary":"Suspend a project: its environments stay live, but no new ones can be added until it is reactivated.","description":"Requires scope `id:projects:write` (until v3.1 also accepted as `projects:write`) and a role that may `manage-environments`. Danger: write.","operationId":"organization_projects_suspend","x-action":"projects.suspend","x-scope":"id:projects:write","x-scope-aliases":["projects:write"],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Project"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/OrganizationApprovalRequired"},"401":{"$ref":"#/components/responses/OrganizationUnauthorized"},"403":{"$ref":"#/components/responses/OrganizationForbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationConflict"},"422":{"$ref":"#/components/responses/OrganizationUnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/provisioning-targets":{"get":{"tags":["Environment › Outbound provisioning"],"summary":"List the downstream SCIM targets people are provisioned to, optionally for one organization, with their failures. Never their credentials.","description":"Requires scope `provisioning:read`. Danger: read.","operationId":"environment_provisioning_targets_list","x-action":"provisioning.targets.list","x-scope":"provisioning:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only this organization's.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProvisioningTarget"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Outbound provisioning"],"summary":"Register a downstream app this platform pushes an organization's people to over SCIM, or every organization's with environment_wide.","description":"Requires scope `provisioning:write`. Danger: critical.","operationId":"environment_provisioning_targets_create","x-action":"provisioning.targets.create","x-scope":"provisioning:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization the target belongs to. Send this or environment_wide.","maxLength":64},"environment_wide":{"type":"boolean","description":"True to make the target the environment's own rather than one organization's. Send this or organization_id."},"name":{"type":"string","description":"What administrators call it: \"Slack\", \"Salesforce\".","maxLength":190},"base_url":{"type":"string","description":"The target's SCIM base URL. Must be a public address.","format":"uri","maxLength":500},"auth_scheme":{"type":"string","description":"bearer (a long-lived token the app issued you) or oauth2_client_credentials (a token fetched before each batch).","enum":["bearer","oauth2_client_credentials"]},"secret":{"type":"string","description":"The bearer token, or the OAuth client secret. Write-only.","maxLength":4096},"token_url":{"type":["string","null"],"description":"oauth2_client_credentials: the token endpoint.","format":"uri","maxLength":2048},"client_id":{"type":["string","null"],"description":"oauth2_client_credentials: the client id.","maxLength":400},"scope":{"type":["string","null"],"description":"oauth2_client_credentials: the scope to ask for, if the app wants one.","maxLength":400}},"required":["name","base_url","auth_scheme","secret"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ProvisioningTarget"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/provisioning-targets/{id}":{"get":{"tags":["Environment › Outbound provisioning"],"summary":"Read one downstream SCIM target: its URL, auth scheme, status and last error. Never its credential.","description":"Requires scope `provisioning:read`. Danger: read.","operationId":"environment_provisioning_targets_get","x-action":"provisioning.targets.get","x-scope":"provisioning:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The target's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ProvisioningTarget"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Outbound provisioning"],"summary":"Delete a downstream SCIM target. Nothing more is pushed to it.","description":"Requires scope `provisioning:write`. Danger: destructive.","operationId":"environment_provisioning_targets_delete","x-action":"provisioning.targets.delete","x-scope":"provisioning:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The target's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/provisioning-targets/{id}/status":{"post":{"tags":["Environment › Outbound provisioning"],"summary":"Pause or resume pushing people to a downstream SCIM target.","description":"Requires scope `provisioning:write`. Danger: write.","operationId":"environment_provisioning_targets_status_set","x-action":"provisioning.targets.status.set","x-scope":"provisioning:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The target's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","description":"true to resume pushing, false to pause."},"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},"required":["active"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ProvisioningTarget"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-decisions":{"get":{"tags":["Environment › Radar"],"summary":"List this environment's Radar decisions newest first — verdict, deciding rule, every rule that fired, reasons and facts — filtered by verdict, flow, rule, country, email, IP, device or time; pass `next_cursor` as `after` to page. Email and IP are matched by keyed pseudonym and never returned.","description":"Requires scope `radar:read`. Danger: read.","operationId":"environment_radar_decisions_list","x-action":"radar.decisions.list","x-scope":"radar:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"verdict","in":"query","required":false,"schema":{"type":"string","description":"`allow`, `challenge` or `block`.","enum":["allow","challenge","block"]}},{"name":"flow","in":"query","required":false,"schema":{"type":"string","description":"`sign_in` or `sign_up`.","enum":["sign_in","sign_up"]}},{"name":"rule","in":"query","required":false,"schema":{"type":"string","description":"A rule key — `builtin:credential_stuffing`, `rule:`, `deny_list:ip` — that decided or fired.","maxLength":64}},{"name":"country","in":"query","required":false,"schema":{"type":"string","description":"Two-letter country code.","maxLength":2}},{"name":"email","in":"query","required":false,"schema":{"type":"string","description":"Attempts with this address (matched by pseudonym).","maxLength":255}},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Attempts from this IP (matched by pseudonym).","maxLength":64}},{"name":"device","in":"query","required":false,"schema":{"type":"string","description":"Attempts from this device id.","maxLength":64}},{"name":"enforced","in":"query","required":false,"schema":{"type":"boolean","description":"Only decisions that were (true) or were not (false) acted on."}},{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"On or after this time (ISO 8601).","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"On or before this time (ISO 8601).","format":"date-time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Decisions per page, 1–100. Default 50.","minimum":1,"maximum":100}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page: the decisions older than it.","maxLength":26}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RadarDecision"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-decisions/{id}":{"get":{"tags":["Environment › Radar"],"summary":"Read one Radar decision: the verdict, whether it was enforced, the deciding rule, every rule that fired, the reasons, the risk score and the facts it was decided on.","description":"Requires scope `radar:read`. Danger: read.","operationId":"environment_radar_decisions_get","x-action":"radar.decisions.get","x-scope":"radar:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The decision's id.","maxLength":26}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RadarDecision"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-lists":{"get":{"tags":["Environment › Radar"],"summary":"List this environment's Radar allow and deny entries — IPs and CIDR ranges, addresses, mail domains, devices — optionally one list or one kind.","description":"Requires scope `radar:read`. Danger: read.","operationId":"environment_radar_lists_list","x-action":"radar.lists.list","x-scope":"radar:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"list","in":"query","required":false,"schema":{"type":"string","description":"`allow` or `deny`; both when omitted.","enum":["allow","deny"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","description":"Only entries of this kind.","enum":["ip","email","email_domain","device"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RadarListEntry"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Radar"],"summary":"Add an entry to this environment's Radar allow or deny list: an IP or CIDR range, an email address, a mail domain (and its subdomains), or a device id from the decisions explorer. Deny blocks before every rule; allow skips every rule.","description":"Requires scope `radar:write`. Danger: write.","operationId":"environment_radar_lists_add","x-action":"radar.lists.add","x-scope":"radar:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"list":{"type":"string","description":"`allow` or `deny`.","enum":["allow","deny"]},"kind":{"type":"string","description":"`ip` (an address or CIDR range), `email`, `email_domain` or `device`.","enum":["ip","email","email_domain","device"]},"value":{"type":"string","description":"The IP, range, address, domain or device id.","maxLength":255},"note":{"type":["string","null"],"description":"Why it is listed.","maxLength":255},"expires_at":{"type":["string","null"],"description":"When the entry stops applying (ISO 8601). Never, when omitted.","format":"date-time"}},"required":["list","kind","value"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RadarListEntry"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-lists/{id}":{"delete":{"tags":["Environment › Radar"],"summary":"Remove an entry from this environment's Radar allow or deny list.","description":"Requires scope `radar:write`. Danger: destructive.","operationId":"environment_radar_lists_remove","x-action":"radar.lists.remove","x-scope":"radar:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The entry's id.","maxLength":26}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-rules":{"get":{"tags":["Environment › Radar"],"summary":"List this environment's own Radar rules in evaluation order (the first whose conditions all hold decides), with their conditions and a readable summary of each.","description":"Requires scope `radar:read`. Danger: read.","operationId":"environment_radar_rules_list","x-action":"radar.rules.list","x-scope":"radar:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Rules per page, 1–100. Default 100 — an environment holds at most 100, so one page is all of them."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page.","maxLength":26}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RadarRule"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Radar"],"summary":"Add a Radar rule: when EVERY condition (field, operator, value) holds, allow, challenge or block. Rules run in order after the allow/deny lists and before the built-in rules; the first match decides. Example: country not_in [DK, SE] → challenge.","description":"Requires scope `radar:write`. Danger: write.","operationId":"environment_radar_rules_create","x-action":"radar.rules.create","x-scope":"radar:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"What the rule is for, as the console lists it.","maxLength":120},"description":{"type":["string","null"],"description":"Why the rule exists, for whoever reads it next.","maxLength":500},"action":{"type":"string","description":"What happens when every condition holds: `allow` (skip every rule after this one), `challenge` (a second factor on sign-in; a CAPTCHA or an emailed code on sign-up) or `block`.","enum":["allow","challenge","block"]},"applies_to":{"type":"string","description":"`all` (the default), `sign_in` or `sign_up`.","enum":["all","sign_in","sign_up"]},"conditions":{"type":"array","description":"Up to 10 conditions; the rule matches when EVERY one holds. A fact that is unknown (no IP intelligence, no address on a passkey sign-in) matches no condition.","minItems":1,"maxItems":10,"items":{"type":"object","properties":{"field":{"type":"string","description":"The fact to test.","enum":["ip","country","asn","as_organization","is_hosting","is_vpn","is_proxy","is_tor","email","email_domain","disposable_email","user_agent","method","new_device","impossible_travel","travel_kmh","risk_score","ip_attempts_1m","ip_attempts_1h","ip_distinct_emails_10m","ip_failures_1h","email_attempts_1h","email_failures_1h","device_attempts_1h"]},"operator":{"type":"string","description":"How to compare it. Which operators a field takes depends on its type.","enum":["eq","neq","in","not_in","gt","gte","lt","lte","contains","not_contains","starts_with","ends_with","in_cidr","not_in_cidr"]},"value":{"type":"string","description":"The one value to compare with, as text — `DK`, `20`, `true`. For every operator except the list ones.","maxLength":255},"values":{"type":"array","description":"The values to compare with, for `in`, `not_in`, `in_cidr` and `not_in_cidr`.","maxItems":100,"items":{"type":"string","maxLength":255}}},"required":["field","operator"]}},"enabled":{"type":"boolean","description":"Whether the rule is evaluated. Default true."},"position":{"type":"integer","description":"Where in the order to put it: 1 is evaluated first. Default: last.","minimum":1}},"required":["name","action","conditions"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RadarRule"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-rules/reorder":{"post":{"tags":["Environment › Radar"],"summary":"Set the order Radar rules are evaluated in: `rule_ids` lists every rule of the environment exactly once, first evaluated first.","description":"Requires scope `radar:write`. Danger: write.","operationId":"environment_radar_rules_reorder","x-action":"radar.rules.reorder","x-scope":"radar:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"rule_ids":{"type":"array","description":"Every rule id, in the new order.","maxItems":100,"items":{"type":"string","maxLength":26}}},"required":["rule_ids"]}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-rules/{id}":{"get":{"tags":["Environment › Radar"],"summary":"Read one Radar rule: its action, the flows it applies to, its position and its conditions.","description":"Requires scope `radar:read`. Danger: read.","operationId":"environment_radar_rules_get","x-action":"radar.rules.get","x-scope":"radar:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The rule's id.","maxLength":26}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RadarRule"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Radar"],"summary":"Change a Radar rule: its name, description, action, flows, enabled state, position, or (replaced whole) its conditions.","description":"Requires scope `radar:write`. Danger: write.","operationId":"environment_radar_rules_update","x-action":"radar.rules.update","x-scope":"radar:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The rule's id.","maxLength":26}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"What the rule is for, as the console lists it.","maxLength":120},"description":{"type":["string","null"],"description":"Why the rule exists, for whoever reads it next.","maxLength":500},"action":{"type":"string","description":"What happens when every condition holds: `allow` (skip every rule after this one), `challenge` (a second factor on sign-in; a CAPTCHA or an emailed code on sign-up) or `block`.","enum":["allow","challenge","block"]},"applies_to":{"type":"string","description":"`all` (the default), `sign_in` or `sign_up`.","enum":["all","sign_in","sign_up"]},"conditions":{"type":"array","description":"Up to 10 conditions; the rule matches when EVERY one holds. A fact that is unknown (no IP intelligence, no address on a passkey sign-in) matches no condition.","minItems":1,"maxItems":10,"items":{"type":"object","properties":{"field":{"type":"string","description":"The fact to test.","enum":["ip","country","asn","as_organization","is_hosting","is_vpn","is_proxy","is_tor","email","email_domain","disposable_email","user_agent","method","new_device","impossible_travel","travel_kmh","risk_score","ip_attempts_1m","ip_attempts_1h","ip_distinct_emails_10m","ip_failures_1h","email_attempts_1h","email_failures_1h","device_attempts_1h"]},"operator":{"type":"string","description":"How to compare it. Which operators a field takes depends on its type.","enum":["eq","neq","in","not_in","gt","gte","lt","lte","contains","not_contains","starts_with","ends_with","in_cidr","not_in_cidr"]},"value":{"type":"string","description":"The one value to compare with, as text — `DK`, `20`, `true`. For every operator except the list ones.","maxLength":255},"values":{"type":"array","description":"The values to compare with, for `in`, `not_in`, `in_cidr` and `not_in_cidr`.","maxItems":100,"items":{"type":"string","maxLength":255}}},"required":["field","operator"]}},"enabled":{"type":"boolean","description":"Whether the rule is evaluated. Default true."},"position":{"type":"integer","description":"Where in the order to put it: 1 is evaluated first. Default: last.","minimum":1}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RadarRule"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Radar"],"summary":"Delete a Radar rule. Attempts it decided are decided by the next matching rule, or the built-in rules, from then on.","description":"Requires scope `radar:write`. Danger: destructive.","operationId":"environment_radar_rules_delete","x-action":"radar.rules.delete","x-scope":"radar:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The rule's id.","maxLength":26}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-settings":{"get":{"tags":["Environment › Radar"],"summary":"Read this environment's Radar settings: the mode (monitor or enforce, and whether it is inherited from the deployment), the IP intelligence source, and every built-in rule with its action and threshold.","description":"Requires scope `radar:read`. Danger: read.","operationId":"environment_radar_settings_get","x-action":"radar.settings.get","x-scope":"radar:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RadarSettings"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Radar"],"summary":"Tune this environment's built-in Radar rules: `builtin_rules` maps a rule key (credential_stuffing, bot_velocity, account_attack, impossible_travel, new_device, anonymous_network, hosting_network, disposable_email, risk_score_reject, risk_score_elevated) to any of enabled, action and threshold.","description":"Requires scope `radar:write`. Danger: write.","operationId":"environment_radar_settings_update","x-action":"radar.settings.update","x-scope":"radar:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"builtin_rules":{"type":"object","description":"Rule key => `{\"enabled\": bool, \"action\": \"allow\"|\"challenge\"|\"block\", \"threshold\": int}`, each part optional. Keys: credential_stuffing, bot_velocity, account_attack, impossible_travel, new_device, anonymous_network, hosting_network, disposable_email, risk_score_reject, risk_score_elevated.","properties":[]}},"required":["builtin_rules"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RadarSettings"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/radar-settings/set-mode":{"post":{"tags":["Environment › Radar"],"summary":"Switch this environment's Radar between `monitor` (verdicts recorded, never acted on) and `enforce` (blocks refuse sign-ins and sign-ups, challenges demand a second factor). Changes the environment's security posture.","description":"Requires scope `radar:manage`. Danger: critical.","operationId":"environment_radar_mode_set","x-action":"radar.mode.set","x-scope":"radar:manage","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","description":"`monitor` or `enforce`.","enum":["monitor","enforce"]}},"required":["mode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RadarSettings"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/role-assignments":{"get":{"operationId":"environment_members_roles_list","x-action":"members.roles.list","tags":["Environment › Roles"],"summary":"List the roles a member holds in the organization","description":"Requires scope `roles:read`. Roles granted AT this organization. Roles a person holds\neverywhere in the environment (staff) are listed under\n`/users/{id}/environment-roles`.\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"required":true,"schema":{"type":"string"},"name":"user_id","in":"query"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"roles:read","x-scope-aliases":[],"x-danger":"read"}},"/v1/role-assignments/{id}":{"put":{"operationId":"environment_members_roles_grant","x-action":"members.roles.grant","tags":["Environment › Roles"],"summary":"Grant a member a role in the organization","description":"Requires scope `roles:write`. Idempotent.\n\n**This API grants with the environment's authority.** It is your backend, so it may\ngrant any role the organization can hold — including a **staff role**\n(`tenant_assignable: false`), such as your support lead's \"Support\" role at one\ncustomer. An organization's own administrators still cannot: their console, their\ninvitations and their directory mappings refuse staff roles, and nothing here\nchanges that.\n\nRefusals: `422 role_not_assignable` (another organization's role, or one from an app\nthis organization cannot use), `409 role_conflict` (segregation of duties).\n","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"required":true,"schema":{"type":"string"},"name":"user_id","in":"query"},{"name":"id","in":"path","required":true,"description":"The role's id — or its manifest `key`, together with `?client_id=` naming the app that declared it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RoleClientId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"Granted (or already held).","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RoleAssignment"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"roles:write","x-scope-aliases":[],"x-danger":"write"},"delete":{"operationId":"environment_members_roles_revoke","x-action":"members.roles.revoke","tags":["Environment › Roles"],"summary":"Take a role back from a member","description":"Requires scope `roles:write`. Idempotent — a role the member does not hold is a 204 too.","parameters":[{"required":true,"description":"The organization's id.","schema":{"type":"string"},"name":"organization_id","in":"query"},{"required":true,"schema":{"type":"string"},"name":"user_id","in":"query"},{"name":"id","in":"path","required":true,"description":"The role's id — or its manifest `key`, together with `?client_id=` naming the app that declared it.","schema":{"type":"string"}},{"$ref":"#/components/parameters/RoleClientId"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Not held any more."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"roles:write","x-scope-aliases":[],"x-danger":"destructive"}},"/v1/role-permissions/{id}":{"put":{"tags":["Environment › Roles"],"summary":"Add a permission to a role: everyone holding the role gains it. The permission must be unscoped or declared by the role's own app.","description":"Requires scope `role_definitions:write`. Danger: write.","operationId":"environment_roles_permissions_grant","x-action":"roles.permissions.grant","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"required":true,"schema":{"type":"string","description":"The role id.","maxLength":64},"name":"role_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The permission id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Role"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Roles"],"summary":"Remove a permission from a role: everyone holding the role loses it.","description":"Requires scope `role_definitions:write`. Danger: destructive.","operationId":"environment_roles_permissions_revoke","x-action":"roles.permissions.revoke","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"required":true,"schema":{"type":"string","description":"The role id.","maxLength":64},"name":"role_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The permission id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Role"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/roles":{"get":{"operationId":"environment_roles_list","x-action":"roles.list","tags":["Environment › Roles"],"summary":"List roles","description":"Requires scope `roles:read`. Every role that can still be granted, ordered by name,\nwith the permissions each carries. Not paginated. `?client_id=` narrows to one\napp's roles; `?organization_id=` to what can be granted in that organization.\n","parameters":[{"name":"client_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"organization_id","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"roles:read","x-scope-aliases":[],"x-danger":"read"},"post":{"tags":["Environment › Roles"],"summary":"Define a role for one organization, or (organization_id null) for the whole environment, optionally scoped to one app, with its opening permissions.","description":"Requires scope `role_definitions:write`. Danger: write.","operationId":"environment_roles_create","x-action":"roles.create","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":["string","null"],"maxLength":500},"organization_id":{"type":["string","null"],"description":"The organization it belongs to; null defines it for every organization in the environment.","maxLength":64},"client_id":{"type":["string","null"],"description":"The app whose tokens it is stamped into; null for every app.","maxLength":190},"permissions":{"type":"array","description":"Permission ids to grant it from the start.","maxItems":200,"items":{"type":"string","maxLength":64}}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Role"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/roles/{id}":{"get":{"tags":["Environment › Roles"],"summary":"Get one role and the permissions it carries. Name it by id, or by manifest `key` with `client_id`.","description":"Requires scope `roles:read`. Danger: read.","operationId":"environment_roles_get","x-action":"roles.get","x-scope":"roles:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The role id, or its manifest `key` with `client_id`.","maxLength":190}},{"name":"client_id","in":"query","required":false,"schema":{"type":"string","description":"The app whose manifest `key` `id` is.","maxLength":255}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Role"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Roles"],"summary":"Rename a role or change its description. An app-declared role is changed in the app's manifest instead.","description":"Requires scope `role_definitions:write`. Danger: write.","operationId":"environment_roles_update","x-action":"roles.update","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The role id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Role"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Roles"],"summary":"Delete a role: everyone who holds it loses it. An app-declared role is removed from the app's manifest instead.","description":"Requires scope `role_definitions:write`. Danger: destructive.","operationId":"environment_roles_delete","x-action":"roles.delete","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The role id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/roles/{id}/activate-definition":{"post":{"tags":["Environment › Roles"],"summary":"Activate a reviewed application role definition for its existing holders.","description":"Requires scope `role_definitions:write`. Danger: destructive.","operationId":"environment_roles_definition_activate","x-action":"roles.definition.activate","x-scope":"role_definitions:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string","minLength":64,"maxLength":64}},"required":["version"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Role"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/saml-apps":{"get":{"tags":["Environment › SAML apps"],"summary":"List the SAML apps that trust this environment as their identity provider.","description":"Requires scope `saml_apps:read`. Danger: read.","operationId":"environment_saml_apps_list","x-action":"saml_apps.list","x-scope":"saml_apps:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SamlApp"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › SAML apps"],"summary":"Register a SAML app that signs people in with their account here. Decides where assertions — and their attributes — are sent.","description":"Requires scope `saml_apps:write`. Danger: critical.","operationId":"environment_saml_apps_create","x-action":"saml_apps.create","x-scope":"saml_apps:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity_id":{"type":"string","description":"The application's SAML EntityID, unique in this environment.","maxLength":500},"acs_url":{"type":"string","description":"Where assertions are posted: https (http only on localhost), absolute, no fragment.","format":"uri","maxLength":1000},"name_id_format":{"type":"string","description":"The NameID format URN. Default emailAddress.","enum":["urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress","urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","urn:oasis:names:tc:SAML:2.0:nameid-format:transient","urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"]},"name_id_attribute":{"type":"string","description":"The person's field the NameID is read from. Default `email`.","maxLength":120},"attribute_mappings":{"type":"array","description":"The attributes the assertion carries. Sent, it is the COMPLETE list afterwards.","maxItems":100,"items":{"type":"object","properties":{"attribute":{"type":"string","description":"The attribute name the assertion emits: `email`, `displayName`.","maxLength":190},"field":{"type":"string","description":"The person's field it is read from: `email`, `name`.","maxLength":190}},"required":["attribute","field"]}},"want_authn_requests_signed":{"type":"boolean","description":"Verify the application's signature on every AuthnRequest. Needs a certificate."},"certificate":{"type":["string","null"],"description":"The application's signing certificate (PEM). Write-only; left out or null keeps the one on file.","maxLength":20000},"organization_id":{"type":["string","null"],"description":"The organization that owns the application: only its active members are signed in to it, and the assertion names it. Null makes it environment-wide — every person in the environment may sign in to it.","maxLength":64}},"required":["entity_id","acs_url"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SamlApp"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/saml-apps/{id}":{"get":{"tags":["Environment › SAML apps"],"summary":"Read one SAML app: its entity id, ACS URL, NameID and attribute mappings. Never its certificate.","description":"Requires scope `saml_apps:read`. Danger: read.","operationId":"environment_saml_apps_get","x-action":"saml_apps.get","x-scope":"saml_apps:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The SAML app's id."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SamlApp"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › SAML apps"],"summary":"Change a SAML app's entity id, ACS URL, NameID, attribute mappings, signing certificate or owning organization.","description":"Requires scope `saml_apps:write`. Danger: critical.","operationId":"environment_saml_apps_update","x-action":"saml_apps.update","x-scope":"saml_apps:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The SAML app's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"entity_id":{"type":"string","description":"The application's SAML EntityID, unique in this environment.","maxLength":500},"acs_url":{"type":"string","description":"Where assertions are posted: https (http only on localhost), absolute, no fragment.","format":"uri","maxLength":1000},"name_id_format":{"type":"string","description":"The NameID format URN. Default emailAddress.","enum":["urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress","urn:oasis:names:tc:SAML:2.0:nameid-format:persistent","urn:oasis:names:tc:SAML:2.0:nameid-format:transient","urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"]},"name_id_attribute":{"type":"string","description":"The person's field the NameID is read from. Default `email`.","maxLength":120},"attribute_mappings":{"type":"array","description":"The attributes the assertion carries. Sent, it is the COMPLETE list afterwards.","maxItems":100,"items":{"type":"object","properties":{"attribute":{"type":"string","description":"The attribute name the assertion emits: `email`, `displayName`.","maxLength":190},"field":{"type":"string","description":"The person's field it is read from: `email`, `name`.","maxLength":190}},"required":["attribute","field"]}},"want_authn_requests_signed":{"type":"boolean","description":"Verify the application's signature on every AuthnRequest. Needs a certificate."},"certificate":{"type":["string","null"],"description":"The application's signing certificate (PEM). Write-only; left out or null keeps the one on file.","maxLength":20000},"organization_id":{"type":["string","null"],"description":"The organization that owns the application: only its active members are signed in to it, and the assertion names it. Null makes it environment-wide — every person in the environment may sign in to it.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SamlApp"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › SAML apps"],"summary":"Remove a SAML app. People can no longer sign in to it with their account here.","description":"Requires scope `saml_apps:write`. Danger: critical.","operationId":"environment_saml_apps_delete","x-action":"saml_apps.delete","x-scope":"saml_apps:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The SAML app's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/saml-metadata-imports":{"post":{"tags":["Environment › Enterprise SSO"],"summary":"Parse an identity provider's SAML metadata (XML or a metadata URL) into the entity id, SSO URL and certificate a SAML connection needs. Stores nothing.","description":"Requires scope `sso:write`. Danger: write.","operationId":"environment_sso_saml_metadata_import","x-action":"sso.saml_metadata.import","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"string","description":"The IdP metadata XML, or an https URL it is published at.","maxLength":500000}},"required":["metadata"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SamlMetadata"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/service-connections":{"get":{"operationId":"environment_listOrganizationServiceConnections","summary":"List the authorized organization's service grants","security":[{"ServiceConnectionAdmin":[]},{"AppAccessToken":[]}],"responses":{"401":{"description":"The token is missing, invalid or addressed to another audience","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks permission for this organization or grant","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested organization, service or grant is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Request rate exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"200":{"description":"Active and revoked grants","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationServiceGrant"}}}}]}}}},"422":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[],"tags":["Environment › General","Apps › General"],"description":"List approved organization service connections: Requires a non-delegated person token and current owner/admin membership in the active organization."}},"/v1/service-connections/{id}":{"put":{"operationId":"environment_connectOrganizationService","summary":"Grant a trusted application access to the selected service","description":"An organization administrator authorizes cbox_billing or cbox_telemetry. Repeating the request returns the organization's existing active grant.\n\nApprove an organization service connection: The service audience and scopes come only from the server catalog. Requires a registered consumer and a non-delegated person token with current organization owner/admin membership.","security":[{"ServiceConnectionAdmin":[]},{"AppAccessToken":[]}],"responses":{"401":{"description":"The token is missing, invalid or addressed to another audience","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks permission for this organization or grant","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested organization, service or grant is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Request rate exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"200":{"description":"Organization grant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationServiceGrant"}}}},"422":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Service name for creation or grant ID for revocation"}],"tags":["Environment › General","Apps › General"]},"delete":{"operationId":"environment_revokeOrganizationService","summary":"Revoke the grant and retire its service account","security":[{"ServiceConnectionAdmin":[]},{"AppAccessToken":[]}],"responses":{"401":{"description":"The token is missing, invalid or addressed to another audience","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks permission for this organization or grant","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested organization, service or grant is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Request rate exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"200":{"description":"Revocation confirmed","content":{"application/json":{"schema":{"type":"object","required":["revoked"],"properties":{"revoked":{"type":"boolean"}}}}}},"422":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Service name for creation or grant ID for revocation"}],"tags":["Environment › General","Apps › General"],"description":"Revoke an organization service connection: Requires current organization owner/admin membership. Revocation stops future leases and inspections."}},"/v1/service-connections/{id}/events":{"get":{"operationId":"environment_listServiceConnectionEvents","summary":"Read events for the organization that approved this service grant","description":"Requires an active cbox_id_events grant and its leased service-account JWT.\nEvery page revalidates consumer registration, organization, environment and\nthe exact issuer audience. Revocation stops existing leases immediately.\nAn organization_id query parameter is prohibited; the grant fixes this boundary.\nEvents are ordered by ID. Preserve the last event ID as the next polling cursor\nwhen meta.next_cursor is null at the end of the currently available results.\n","security":[{"ServiceConnectionEvents":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"after","in":"query","schema":{"type":"string","maxLength":64}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}},{"name":"types","in":"query","description":"Optional event-type allow-list, encoded as types[0], types[1], etc.","style":"form","explode":true,"schema":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1,"maxLength":190}}}],"responses":{"401":{"description":"Missing, invalid or wrong-audience bearer token","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Inactive organization, revoked consumer trust or insufficient scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No active grant belonging to this service account","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid query parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Request rate exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"200":{"description":"Organization-scoped event page; Cache-Control is no-store","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/DomainEvent"}}}}]}}}}},"tags":["Environment › General"]}},"/v1/service-connections/{id}/inspect":{"post":{"operationId":"environment_inspectProviderConnection","summary":"Inspect the connection before delivering data","security":[{"ServiceConnectionProvider":[]},{"AppAccessToken":[]}],"responses":{"401":{"description":"The token is missing, invalid or addressed to another audience","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks permission for this organization or grant","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested organization, service or grant is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Request rate exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"200":{"description":"Inspect the connection before delivering data","content":{"application/json":{"schema":{"type":"object","required":["active"],"properties":{"active":{"type":"boolean"},"service_client_id":{"type":"string"},"organization_id":{"type":"string"},"audience":{"type":"string"},"service":{"type":"string"}}}}}},"422":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Environment › General","Apps › General"],"description":"Check current service connection authority: A non-delegated machine token from the registered consumer or target service checks current catalog, revocation and organization state. An inactive or absent connection returns active=false."}},"/v1/service-connections/{id}/lease":{"post":{"operationId":"environment_leaseServiceConnectionToken","summary":"Lease a short-lived token for the connection resource","security":[{"ServiceConnectionConsumer":[]},{"AppAccessToken":[]}],"responses":{"401":{"description":"The token is missing, invalid or addressed to another audience","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The caller lacks permission for this organization or grant","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"The requested organization, service or grant is unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Request rate exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"200":{"description":"Lease a short-lived token for the connection resource","content":{"application/json":{"schema":{"type":"object","required":["access_token","token_type","expires_in","scope","audience"],"properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer"},"scope":{"type":"string"},"audience":{"type":"string"}}}}}},"422":{"description":"The request is invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The issuer could not issue the exact approved audience and scopes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Environment › General","Apps › General"],"description":"Lease a service access token: Only the registered consumer’s non-delegated machine token can lease its active connection. The organization and current catalog audience/scopes must still match."}},"/v1/sign-in/policy":{"get":{"tags":["Environment › Sign-in"],"summary":"Read the authentication policy (password, MFA, SSO, lockout): the environment baseline, or one organization's effective rules and override.","description":"Requires scope `signin:read`. Danger: read.","operationId":"environment_signin_policy_get","x-action":"signin.policy.get","x-scope":"signin:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"Read one organization's rules. Left out, the environment baseline.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SignInPolicy"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Sign-in"],"summary":"Change the authentication policy of the environment baseline — including whether passkeys and magic links are offered and how long sessions last — or tighten one organization's override. Requiring SSO signs out password sessions.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_policy_update","x-action":"signin.policy.update","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Write this organization's override. Left out, the environment baseline.","maxLength":64},"min_length":{"type":"integer","description":"Minimum password length.","minimum":8,"maximum":128},"require_breach_check":{"type":"boolean","description":"Refuse passwords that appear in known breaches."},"max_age_days":{"type":["integer","null"],"description":"Days before a password must be changed; null for no limit.","minimum":1,"maximum":3650},"reuse_history":{"type":"integer","description":"How many previous passwords may not be reused.","minimum":0,"maximum":24},"mfa":{"type":"string","description":"Whether a second factor is off, optional or required.","enum":["off","optional","required"]},"sso":{"type":"string","description":"Whether SSO is off, preferred, or required — `required` refuses every other way in and signs out password sessions.","enum":["off","preferred","required"]},"lockout_threshold":{"type":["integer","null"],"description":"Failed attempts before an account is locked; null for the deployment default (10 inside 15 minutes unless CBOX_ID_LOCKOUT_THRESHOLD says otherwise).","minimum":3,"maximum":100},"passkeys":{"type":"boolean","description":"Environment only. Whether people may sign in with a passkey, and add one. Off at the deployment (CBOX_ID_PASSKEYS_ENABLED=false) stays off."},"magic_link":{"type":"boolean","description":"Environment only. Whether a one-time sign-in link may be emailed. Off at the deployment (CBOX_ID_MAGIC_LINK_ENABLED=false) stays off."},"session_idle_minutes":{"type":["integer","null"],"description":"Environment only. Minutes of inactivity before a session ends; null for the deployment's. No more than the deployment allows (CBOX_ID_SESSION_IDLE_MINUTES).","minimum":1,"maximum":525600},"session_absolute_minutes":{"type":["integer","null"],"description":"Environment only. Minutes a session lasts at most, however active; null for the deployment's. No more than the deployment allows (CBOX_ID_SESSION_TTL_MINUTES).","minimum":5,"maximum":525600},"bot_challenge":{"type":"boolean","description":"Environment only. Whether a sign-up Radar flags is asked to prove it is a person (Cloudflare Turnstile). Has no effect where the deployment has no Turnstile keys."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SignInPolicy"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sign-in/self-service-signup":{"put":{"tags":["Environment › Sign-in"],"summary":"Switch self-service sign-up on or off: whether people can create an account and their own organization in this environment.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_self_service_signup_set","x-action":"signin.self_service_signup.set","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"On: anyone may create an account and their own organization. Off: people join by invitation."}},"required":["enabled"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SelfServiceSignup"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sign-in/sms":{"get":{"tags":["Environment › Sign-in"],"summary":"Read the SMS second-factor policy: whether text-message codes are accepted, for which countries, and the administrator rule.","description":"Requires scope `signin:read`. Danger: read.","operationId":"environment_signin_sms_get","x-action":"signin.sms.get","x-scope":"signin:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SmsFactorPolicy"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Sign-in"],"summary":"Change the SMS second-factor policy: accept text-message codes or not, the countries they may go to, and whether SMS may be an administrator's only factor.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_sms_update","x-action":"signin.sms.update","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Accept text messages as a second factor in this environment. Off by default: SMS is the weakest factor offered."},"allowed_countries":{"type":"array","description":"ISO 3166-1 alpha-2 countries whose numbers may enrol and be texted. Required to be non-empty while SMS is on: which countries you text is your toll-fraud exposure.","maxItems":250,"items":{"type":"string","enum":["AC","AD","AE","AF","AG","AI","AL","AM","AO","AR","AS","AT","AU","AW","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BM","BN","BO","BR","BS","BT","BW","BY","BZ","CA","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GH","GI","GL","GM","GN","GP","GQ","GR","GT","GU","GW","GY","HK","HN","HR","HT","HU","ID","IE","IL","IN","IO","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","US","UY","UZ","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","ZA","ZM","ZW"],"maxLength":2}},"privileged_need_stronger_factor":{"type":"boolean","description":"Administrators may add SMS only beside an authenticator app or a passkey, and are asked to enrol one if SMS is all they hold. On by default."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SmsFactorPolicy"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sign-in/through":{"put":{"tags":["Environment › Sign-in"],"summary":"Send this environment's sign-in page straight to one of its own OpenID Connect connections (or back to its own page with null). /login/direct always stays the environment's own page.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_through_set","x-action":"signin.through.set","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"connection_id":{"type":["string","null"],"description":"An active OpenID Connect connection that belongs to the whole environment (sso.connections.create with environment_wide: true). Null for the environment's own sign-in page.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SignInThrough"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/signals-source":{"get":{"operationId":"environment_signals_source_list","summary":"Read the environment-owner identity source","description":"Requires an environment key with `signals_source:read` and explicit operator\nopt-in for this environment. Organization grants and delegated user tokens\ncannot read this source. Records include pre-organization authentication.\nThe cursor follows committed sequence order and is bound to the source generation.\nFollow `next_cursor`, including on empty pages; a stale generation or purged\ncursor requires an explicit restart. Pages are at most 1000 records / 1 MiB.\nData follows the Signals 2.0.0 identity event contracts. Scope is attached by\nthe consumer's explicit grant; producer_environment is always host-bound.\nReplay is limited to seven days, including raw-IP retention. A heartbeat\nproves exporter maintenance, not complete coverage of every identity flow.\n","security":[{"EnvironmentApiKey":[]}],"parameters":[{"name":"after","in":"query","schema":{"type":"string","maxLength":1024}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":500}}],"responses":{"200":{"description":"A bounded source page, including an empty page.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","required":["contract_version","id","producer_environment","organization_id","position","kind","occurred_at","recorded_at"],"properties":{"contract_version":{"const":"2.0.0"},"id":{"type":"string"},"producer_environment":{"type":"string"},"organization_id":{"type":["string","null"]},"position":{"type":"object","required":["source_id","partition","generation","sequence"],"properties":{"source_id":{"type":"string"},"partition":{"const":"0"},"generation":{"type":"string"},"sequence":{"type":"string","pattern":"^[0-9]+$"}}},"kind":{"enum":["event","relation"]},"name":{"enum":["identity.authentication","identity.session","identity.token","identity.account","identity.activity"]},"occurred_at":{"type":"string","format":"date-time"},"recorded_at":{"type":"string","format":"date-time"},"data":{"type":"object"}}}}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Capture is not enabled for this environment.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Environment › General"]}},"/v1/signals-source/erasures":{"get":{"operationId":"environment_signals_source_erasures","summary":"Replay source deletion receipts","description":"Requires `signals_source:read` on an environment-owner key. Replay this stream\nbefore making a restored or newly backfilled consumer eligible. It retains only\nopaque subject references and deletion facts beyond the raw-event replay window.\nPublication order and cursor integrity match the event source. The credential\nis checked on every page. Ordinary tenant grants cannot access this stream.\n","security":[{"EnvironmentApiKey":[]}],"parameters":[{"name":"after","in":"query","schema":{"type":"string","maxLength":1024}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":500}}],"responses":{"200":{"description":"A bounded deletion receipt page.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","maxItems":1000,"items":{"type":"object","required":["id","producer_environment","position","name","data"]}}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Capture is disabled or publication is backpressured.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Environment › General"]}},"/v1/social-connections":{"get":{"tags":["Environment › Sign-in"],"summary":"List the social login providers (Google, GitHub, Apple…) set up in this environment — the environment's own and organizations' — optionally for one organization.","description":"Requires scope `signin:read`. Danger: read.","operationId":"environment_signin_social_list","x-action":"signin.social.list","x-scope":"signin:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"Only this organization's own providers (not the ones it inherits — see signin.social.offered).","maxLength":64}},{"name":"level","in":"query","required":false,"schema":{"type":"string","description":"Only the environment's providers, which every organization inherits, or only organizations' own.","enum":["environment","organization"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SocialProvider"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Sign-in"],"summary":"Enable a social login provider (Google, GitHub, Apple…) for the whole environment or for one organization, with its client credentials. The secret is never returned.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_social_set","x-action":"signin.social.set","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization the provider belongs to. Send this or environment_wide.","maxLength":64},"environment_wide":{"type":"boolean","description":"True to make the provider the environment's own rather than one organization's. Send this or organization_id."},"provider":{"type":"string","description":"The catalogue key: google, microsoft, okta, auth0, keycloak, gitlab, slack, github, discord, apple, facebook, linkedin, bitbucket, xero, intuit.","maxLength":100},"client_id":{"type":"string","description":"The client id from your own account with the provider. For Apple, the Services ID.","maxLength":400},"client_secret":{"type":["string","null"],"description":"The client secret. Write-only. Not used by Apple, which signs its own.","maxLength":5000},"parameters":{"type":"object","description":"What the chosen provider needs besides its client credentials — Microsoft's directory, Okta's domain, Apple's team id, key id and private key.","properties":{"directory":{"type":["string","null"],"description":"Directory (tenant) ID (Microsoft Entra ID).","maxLength":5000},"domain":{"type":["string","null"],"description":"Okta domain (Okta).","maxLength":5000},"host":{"type":["string","null"],"description":"Keycloak host (Keycloak).","maxLength":5000},"key_id":{"type":["string","null"],"description":"Key ID (Apple).","maxLength":5000},"private_key":{"type":["string","null"],"description":"Private key (.p8) (Apple).","maxLength":5000},"realm":{"type":["string","null"],"description":"Realm (Keycloak).","maxLength":5000},"team_id":{"type":["string","null"],"description":"Team ID (Apple).","maxLength":5000}}},"scopes":{"type":"array","description":"Extra scopes to request beyond the ones sign-in needs (for example `read:org` on GitHub). Replaces any extra scopes already set; an empty list removes them.","maxItems":20,"items":{"type":"string","maxLength":200}},"reserved_id":{"type":["string","null"],"description":"A ULID to create the provider under, so its redirect URI (which contains the id) can be registered with the provider first. Left out, one is minted.","maxLength":26}},"required":["provider","client_id"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SocialProvider"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/social-connections/inherit":{"post":{"tags":["Environment › Sign-in"],"summary":"Turn one of the environment's social login providers off (or back on) for one organization's sign-in page.","description":"Requires scope `signin:write`. Danger: write.","operationId":"environment_signin_social_inherit","x-action":"signin.social.inherit","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"required":true,"schema":{"type":"string","description":"The catalogue key: google, github…","maxLength":100},"name":"provider","in":"query"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":"string","description":"The organization whose sign-in page this is about.","maxLength":64},"offered":{"type":"boolean","description":"False to stop offering the environment's provider on this organization's page; true to offer it again."}},"required":["organization_id","offered"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OfferedSocialProviders"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/social-connections/offered":{"get":{"tags":["Environment › Sign-in"],"summary":"The social login buttons one organization's sign-in page shows (or the plain sign-in page's), after inheritance from the environment, with where each comes from.","description":"Requires scope `signin:read`. Danger: read.","operationId":"environment_signin_social_offered","x-action":"signin.social.offered","x-scope":"signin:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"The organization whose sign-in page to resolve. Left out, the plain sign-in page, before anybody has said who they are.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/OfferedSocialProviders"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/social-connections/{id}":{"patch":{"tags":["Environment › Sign-in"],"summary":"Change a social login provider's client credentials, provider values or extra scopes. Secrets left out keep the ones on file.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_social_update","x-action":"signin.social.update","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The provider's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only change it if it is this organization's; anything else is a 404.","maxLength":64},"client_id":{"type":"string","description":"A new client id. For Apple, the Services ID.","maxLength":400},"client_secret":{"type":["string","null"],"description":"A new client secret. Write-only; left out or blank keeps the one on file.","maxLength":5000},"parameters":{"type":"object","description":"What the chosen provider needs besides its client credentials — Microsoft's directory, Okta's domain, Apple's team id, key id and private key.","properties":{"directory":{"type":["string","null"],"description":"Directory (tenant) ID (Microsoft Entra ID).","maxLength":5000},"domain":{"type":["string","null"],"description":"Okta domain (Okta).","maxLength":5000},"host":{"type":["string","null"],"description":"Keycloak host (Keycloak).","maxLength":5000},"key_id":{"type":["string","null"],"description":"Key ID (Apple).","maxLength":5000},"private_key":{"type":["string","null"],"description":"Private key (.p8) (Apple).","maxLength":5000},"realm":{"type":["string","null"],"description":"Realm (Keycloak).","maxLength":5000},"team_id":{"type":["string","null"],"description":"Team ID (Apple).","maxLength":5000}}},"scopes":{"type":"array","description":"Extra scopes to request beyond the ones sign-in needs (for example `read:org` on GitHub). Replaces any extra scopes already set; an empty list removes them.","maxItems":20,"items":{"type":"string","maxLength":200}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SocialProvider"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Sign-in"],"summary":"Stop offering a social login provider. People who used it keep their accounts.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_social_delete","x-action":"signin.social.delete","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The provider's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only remove it if it is this organization's.","maxLength":64}}}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/social-connections/{id}/disable":{"post":{"tags":["Environment › Sign-in"],"summary":"Turn a social login provider off without removing it. People who used it keep their accounts.","description":"Requires scope `signin:write`. Danger: critical.","operationId":"environment_signin_social_disable","x-action":"signin.social.disable","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The provider's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SocialProvider"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/social-connections/{id}/enable":{"post":{"tags":["Environment › Sign-in"],"summary":"Turn a social login provider that was turned off back on, with the credentials it already has.","description":"Requires scope `signin:write`. Danger: write.","operationId":"environment_signin_social_enable","x-action":"signin.social.enable","x-scope":"signin:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The provider's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SocialProvider"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sod-policies":{"get":{"tags":["Environment › Governance"],"summary":"List role-conflict (segregation of duties) rules: sets of roles no one person may hold together. Optionally those binding one organization.","description":"Requires scope `governance:read`. Danger: read.","operationId":"environment_sod_policies_list","x-action":"sod_policies.list","x-scope":"governance:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only the rules binding this organization: its own and the environment-wide ones.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SodPolicy"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Governance"],"summary":"Define a role-conflict rule: two or more roles no one person may hold together. Enforced on every grant from now on.","description":"Requires scope `governance:write`. Danger: write.","operationId":"environment_sod_policies_create","x-action":"sod_policies.create","x-scope":"governance:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization the rule belongs to. Send this or environment_wide.","maxLength":64},"environment_wide":{"type":"boolean","description":"True to make the rule the environment's own rather than one organization's. Send this or organization_id."},"name":{"type":"string","description":"What the rule is for: \"Payments maker/checker\".","maxLength":190},"description":{"type":["string","null"],"description":"Why the roles conflict.","maxLength":500},"role_ids":{"type":"array","description":"The roles no one person may hold together; at least two.","minItems":2,"maxItems":50,"items":{"type":"string","maxLength":64}}},"required":["name","role_ids"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SodPolicy"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sod-policies/{id}":{"get":{"tags":["Environment › Governance"],"summary":"Read one role-conflict rule: the roles no one person may hold together, and whether it is enforced.","description":"Requires scope `governance:read`. Danger: read.","operationId":"environment_sod_policies_get","x-action":"sod_policies.get","x-scope":"governance:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The rule's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only if it binds this organization (its own, or environment-wide); anything else is a 404.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SodPolicy"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Governance"],"summary":"Remove a role-conflict rule. Grants it refused are allowed from then on.","description":"Requires scope `governance:write`. Danger: critical.","operationId":"environment_sod_policies_delete","x-action":"sod_policies.delete","x-scope":"governance:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The rule's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sod-policies/{id}/status":{"post":{"tags":["Environment › Governance"],"summary":"Enforce a role-conflict rule, or stop enforcing it — switched off, grants that break it are allowed again.","description":"Requires scope `governance:write`. Danger: critical.","operationId":"environment_sod_policies_status_set","x-action":"sod_policies.status.set","x-scope":"governance:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The rule's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","description":"true to enforce the rule, false to stop enforcing it."},"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},"required":["active"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SodPolicy"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sso-connections":{"get":{"tags":["Environment › Enterprise SSO"],"summary":"List the SAML and OIDC connections organizations sign in through, optionally for one organization. Never a certificate or secret.","description":"Requires scope `sso:read`. Danger: read.","operationId":"environment_sso_connections_list","x-action":"sso.connections.list","x-scope":"sso:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only this organization's.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SsoConnection"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Enterprise SSO"],"summary":"Connect an organization's SAML or OIDC identity provider as a draft. Activate it to start signing people in through it.","description":"Requires scope `sso:write`. Danger: write.","operationId":"environment_sso_connections_create","x-action":"sso.connections.create","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization the connection belongs to. Send this or environment_wide.","maxLength":64},"environment_wide":{"type":"boolean","description":"True to make the connection the environment's own rather than one organization's. Send this or organization_id."},"name":{"type":"string","description":"What administrators call it: \"Okta\", \"Entra ID\".","maxLength":120},"type":{"type":"string","description":"saml or oidc. The config fields of that type are required, unless pending_idp.","enum":["saml","oidc"]},"pending_idp":{"type":"boolean","description":"True to create the draft before the identity provider's details are known: the answer's service_provider is what to paste into it. Complete it with update before activating."},"idp_entity_id":{"type":["string","null"],"description":"SAML: the identity provider's entity id.","maxLength":500},"idp_sso_url":{"type":["string","null"],"description":"SAML: the identity provider's single sign-on URL.","format":"uri","maxLength":500},"idp_x509cert":{"type":["string","null"],"description":"SAML: the identity provider's signing certificate (PEM). Write-only.","maxLength":20000},"sp_entity_id":{"type":["string","null"],"description":"SAML: the entity id this environment presents as the service provider. Left out on create, this connection's own.","maxLength":500},"sp_acs_url":{"type":["string","null"],"description":"SAML: where the identity provider posts its assertions. Left out on create, this connection's own ACS URL.","format":"uri","maxLength":500},"issuer":{"type":["string","null"],"description":"OIDC: the provider's issuer URL; its endpoints are discovered from it.","format":"uri","maxLength":500},"client_id":{"type":["string","null"],"description":"OIDC: the client id registered at the provider.","maxLength":500},"client_secret":{"type":["string","null"],"description":"OIDC: the client secret. Write-only.","maxLength":500},"signing_key":{"type":["string","null"],"description":"OIDC, optional: the provider's ID-token signing key (an RS256 public key, PEM). Leave it out for any provider whose discovery document publishes a jwks_uri — the keys are read from there and follow its rotations. Needed only when it does not. Write-only.","maxLength":20000}},"required":["name","type"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoConnection"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sso-connections/{id}":{"get":{"tags":["Environment › Enterprise SSO"],"summary":"Read one SSO connection: its type, status, entity ids, URLs, issuer and client id. Never a certificate or secret.","description":"Requires scope `sso:read`. Danger: read.","operationId":"environment_sso_connections_get","x-action":"sso.connections.get","x-scope":"sso:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoConnection"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Enterprise SSO"],"summary":"Change an SSO connection's name or identity-provider settings. Secrets left out keep the ones on file.","description":"Requires scope `sso:write`. Danger: critical.","operationId":"environment_sso_connections_update","x-action":"sso.connections.update","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64},"name":{"type":"string","description":"A new name.","maxLength":120},"idp_entity_id":{"type":["string","null"],"description":"SAML: the identity provider's entity id.","maxLength":500},"idp_sso_url":{"type":["string","null"],"description":"SAML: the identity provider's single sign-on URL.","format":"uri","maxLength":500},"idp_x509cert":{"type":["string","null"],"description":"SAML: the identity provider's signing certificate (PEM). Write-only.","maxLength":20000},"sp_entity_id":{"type":["string","null"],"description":"SAML: the entity id this environment presents as the service provider. Left out on create, this connection's own.","maxLength":500},"sp_acs_url":{"type":["string","null"],"description":"SAML: where the identity provider posts its assertions. Left out on create, this connection's own ACS URL.","format":"uri","maxLength":500},"issuer":{"type":["string","null"],"description":"OIDC: the provider's issuer URL; its endpoints are discovered from it.","format":"uri","maxLength":500},"client_id":{"type":["string","null"],"description":"OIDC: the client id registered at the provider.","maxLength":500},"client_secret":{"type":["string","null"],"description":"OIDC: the client secret. Write-only.","maxLength":500},"signing_key":{"type":["string","null"],"description":"OIDC, optional: the provider's ID-token signing key (an RS256 public key, PEM). Leave it out for any provider whose discovery document publishes a jwks_uri — the keys are read from there and follow its rotations. Needed only when it does not. Write-only.","maxLength":20000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoConnection"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Enterprise SSO"],"summary":"Delete an SSO connection and its settings. Where SSO is required, its people cannot sign in until another is activated.","description":"Requires scope `sso:write`. Danger: critical.","operationId":"environment_sso_connections_delete","x-action":"sso.connections.delete","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sso-connections/{id}/activate":{"post":{"tags":["Environment › Enterprise SSO"],"summary":"Activate an SSO connection: people whose email domain routes to it start signing in through it.","description":"Requires scope `sso:write`. Danger: critical.","operationId":"environment_sso_connections_activate","x-action":"sso.connections.activate","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoConnection"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sso-connections/{id}/activate-certificate":{"post":{"tags":["Environment › Enterprise SSO"],"summary":"Make a staged SAML signing certificate the connection's primary. The certificate it replaces stops being trusted.","description":"Requires scope `sso:write`. Danger: critical.","operationId":"environment_sso_connections_certificates_activate","x-action":"sso.connections.certificates.activate","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64},"fingerprint_sha256":{"type":"string","description":"The staged certificate's SHA-256 fingerprint, as the certificate list gives it.","maxLength":200}},"required":["fingerprint_sha256"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoCertificates"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sso-connections/{id}/certificates":{"get":{"tags":["Environment › Enterprise SSO"],"summary":"List a SAML connection's signing certificates — primary and staged — with each one's fingerprint and expiry.","description":"Requires scope `sso:read`. Danger: read.","operationId":"environment_sso_connections_certificates_list","x-action":"sso.connections.certificates.list","x-scope":"sso:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoCertificates"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Enterprise SSO"],"summary":"Stage a SAML connection's new IdP signing certificate (PEM or IdP metadata) beside the current one, so a renewal has no outage. Activate it once the IdP signs with it.","description":"Requires scope `sso:write`. Danger: critical.","operationId":"environment_sso_connections_certificates_stage","x-action":"sso.connections.certificates.stage","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64},"certificate":{"type":["string","null"],"description":"The new signing certificate, PEM. Send this or metadata.","maxLength":20000},"metadata":{"type":["string","null"],"description":"The identity provider's metadata XML, or the https URL it is published at. Send this or certificate.","maxLength":500000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoCertificates"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sso-connections/{id}/disable":{"post":{"tags":["Environment › Enterprise SSO"],"summary":"Disable an SSO connection without deleting it. Where SSO is required, its people cannot sign in until it is re-activated.","description":"Requires scope `sso:write`. Danger: critical.","operationId":"environment_sso_connections_disable","x-action":"sso.connections.disable","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SsoConnection"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sso-connections/{id}/require-sso":{"post":{"tags":["Environment › Enterprise SSO"],"summary":"Require single sign-on for the organization an SSO connection belongs to. Ends every password session there.","description":"Requires scope `sso:write`. Danger: critical.","operationId":"environment_sso_connections_require_sso","x-action":"sso.connections.require_sso","x-scope":"sso:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The connection's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Only if it is this organization's; anything else is a 404.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SignInPolicy"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/support-sessions":{"post":{"operationId":"environment_support_sessions_start","x-action":"support_sessions.start","tags":["Environment › Support sessions"],"summary":"Start a support session","description":"Requires scope `support:write`. A member of your staff (`actor_user_id`) signs in to\none of your apps (`client_id`) AS one of a customer's users (`user_id` in\n`organization_id`), for a stated `reason`, for at most 60 minutes.\n\nThe actor must hold your app's own `support:impersonate` permission through an\n**environment-wide** grant (see `PUT /users/{id}/environment-roles/{role_id}`);\notherwise `403 not_permitted`. The app must be a first-party app the environment\nowns that uses the authorization-code grant (`422 client_not_eligible`). The target\nmust be an active member (`422 target_not_member`) of an active organization\n(`409 organization_inactive`).\n\nSend `redirect_uri` (registered for the app) and a PKCE S256 `code_challenge` to get\nthe first authorization `code` in the response. Your app redeems it at `/oauth/token`\nwith the verifier; every token carries `act: {\"sub\": actor_user_id}` and there is\nnever a refresh token. The session is audited on the customer's trail and the\nenvironment's, and announced as the `support_session.started` webhook.\n\n`scopes` in the response are exactly what every token of the session carries: the\nones asked for (or, with none, the app's registration), never `offline_access`, and\naudienced the way the token endpoint audiences them — once any of them belongs to a\nregistered API, the token is for that API and a scope no API registered (such as\n`apps.manifest`) is left out. Scopes of two registered APIs cannot be audienced to\none token and are refused before the session starts (`422 invalid_target`).\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","organization_id","client_id","actor_user_id","reason"],"properties":{"user_id":{"type":"string","description":"The customer's user to act as."},"organization_id":{"type":"string"},"client_id":{"type":"string","description":"The app's public client id."},"actor_user_id":{"type":"string","description":"Your staff member."},"reason":{"type":"string","maxLength":500,"description":"Shown to the customer."},"ttl_minutes":{"type":"integer","minimum":1,"maximum":60},"scopes":{"type":"array","items":{"type":"string"},"description":"Narrowed to the app's registration; omitted means all of it."},"redirect_uri":{"type":"string"},"code_challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"nonce":{"type":["string","null"]}}}}}},"responses":{"201":{"description":"Started.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SupportSession"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"support:write","x-scope-aliases":[],"x-danger":"critical"}},"/v1/support-sessions/{id}":{"delete":{"tags":["Environment › Support sessions"],"summary":"End a support session now: every token it issued is revoked.","description":"Requires scope `support:write`. Danger: destructive.","operationId":"environment_support_sessions_end","x-action":"support_sessions.end","x-scope":"support:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The support session id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/user-property-namespaces/{id}":{"get":{"tags":["Environment › User properties"],"summary":"Read the app and webhook grants for a user-property namespace.","description":"Requires scope `user_property_namespaces:read`. Danger: read.","operationId":"environment_user_property_namespaces_show","x-action":"user_property_namespaces.show","x-scope":"user_property_namespaces:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Environment › User properties"],"summary":"Create or replace the app and webhook grants for a user-property namespace. Empty grants revoke access without deleting user data.","description":"Requires scope `user_property_namespaces:write`. Danger: critical.","operationId":"environment_user_property_namespaces_configure","x-action":"user_property_namespaces.configure","x-scope":"user_property_namespaces:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"readers":{"type":"array","description":"OAuth client ids allowed to read. Omit or use an empty list to revoke all access.","maxItems":100,"items":{"type":"string","maxLength":190}},"writers":{"type":"array","description":"Reader client ids also allowed to write.","maxItems":100,"items":{"type":"string","maxLength":190}},"webhooks":{"type":"object","description":"Map webhook endpoint ids to reader client ids. Omit to remove all webhook grants.","properties":[]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"type":"object"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/user-sessions/{id}":{"delete":{"tags":["Environment › Users"],"summary":"End one of a user's sign-in sessions.","description":"Requires scope `users:write`. Danger: destructive.","operationId":"environment_users_sessions_revoke","x-action":"users.sessions.revoke","x-scope":"users:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"required":true,"schema":{"type":"string","description":"The user id.","maxLength":64},"name":"user_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The session id, from `GET /users/{id}/sessions`.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users":{"get":{"operationId":"environment_users_list","x-action":"users.list","tags":["Environment › Users"],"summary":"List users","description":"Requires scope `users:read`. A page at a time, in id order. Narrow it the ways you\nlook for somebody: `email` (exactly that address, case-insensitive), `q` (a fragment\nof the address or the name) and `status`. Filters combine.\n","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"name":"email","in":"query","required":false,"schema":{"type":"string","format":"email","maxLength":190}},{"name":"q","in":"query","required":false,"description":"A fragment of the address or the name.","schema":{"type":"string","maxLength":190}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","disabled","locked"]}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"400":{"$ref":"#/components/responses/EnvironmentRequired"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"users:read","x-scope-aliases":[],"x-danger":"read"},"post":{"operationId":"environment_users_create","x-action":"users.create","tags":["Environment › Users"],"summary":"Create a user","description":"Requires scope `users:write`. Password is optional — omit it to create a passwordless identity the user completes via an invite/magic-link.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":190},"name":{"type":["string","null"],"maxLength":190},"password":{"type":["string","null"],"minLength":8,"maxLength":255,"description":"Checked against this environment's password policy (`422 password_policy`)."},"send_sign_in_link":{"type":"boolean","default":false,"description":"Mail the new user a one-click sign-in link."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"users:write","x-scope-aliases":[],"x-danger":"write"}},"/v1/users/{id}":{"get":{"operationId":"environment_users_get","x-action":"users.get","tags":["Environment › Users"],"summary":"Get a user","description":"Requires scope `users:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"users:read","x-scope-aliases":[],"x-danger":"read"},"patch":{"tags":["Environment › Users"],"summary":"Change a user's name and/or email address. A changed address must be verified again.","description":"Requires scope `users:write`. Danger: critical.","operationId":"environment_users_update","x-action":"users.update","x-scope":"users:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":190},"email":{"type":"string","description":"The new address. Its verification is cleared.","format":"email","maxLength":190}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"environment_users_deactivate","x-action":"users.deactivate","tags":["Environment › Users"],"summary":"Deactivate a user","description":"Requires scope `users:write`. A **soft disable** — the identity can no longer\nauthenticate, but is never hard-deleted — and every OAuth grant they hold is\nrevoked, which reactivating them does not bring back. Returns the user in its new\n`disabled` state. Idempotent. The console's \"Deactivate\" is this action.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"users:write","x-scope-aliases":[],"x-danger":"destructive"}},"/v1/users/{id}/environment-roles":{"get":{"operationId":"environment_users_environment_roles_list","x-action":"users.environment_roles.list","tags":["Environment › Roles"],"summary":"List the roles a user holds everywhere (staff)","description":"Requires scope `roles:read`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"roles:read","x-scope-aliases":[],"x-danger":"read"}},"/v1/users/{id}/erase":{"post":{"tags":["Environment › Users"],"summary":"Erase a person (GDPR Art. 17): revoke their sessions and tokens, delete their credentials, memberships and personal data, and pseudonymise their account. Cannot be undone.","description":"Requires scope `users:erase`. Danger: critical.","operationId":"environment_users_erase","x-action":"users.erase","x-scope":"users:erase","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErasureReceipt"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users/{id}/mfa":{"delete":{"tags":["Environment › Users"],"summary":"Reset a user's two-factor authentication: their authenticator and recovery codes are removed and they must enrol again.","description":"Requires scope `users:write`. Danger: critical.","operationId":"environment_users_mfa_reset","x-action":"users.mfa.reset","x-scope":"users:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users/{id}/password":{"post":{"tags":["Environment › Users"],"summary":"Set a user's password, temporary by default, and mail it to them unless told not to. Signs them out according to `revoke`.","description":"Requires scope `users:write`. Danger: critical.","operationId":"environment_users_password_set","x-action":"users.password.set","x-scope":"users:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The new password. Checked against this environment's password policy.","maxLength":200},"reason":{"type":"string","description":"Why — recorded on the audit trail.","maxLength":200},"temporary":{"type":"boolean","description":"The user must choose a new password at their next sign-in. Default true."},"expires_in_hours":{"type":"integer","description":"A temporary password stops working after this many hours. 0 or absent: until changed.","minimum":0,"maximum":8760},"revoke":{"type":"string","description":"How much existing access to end. Default `sessions_and_tokens`.","enum":["sessions_and_tokens","sessions_only","nothing"]},"send_email":{"type":"boolean","description":"Mail the password to the user. Default true."}},"required":["password","reason"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users/{id}/password-reset":{"post":{"tags":["Environment › Users"],"summary":"Mail a user a password-reset link at their own address.","description":"Requires scope `users:write`. Danger: write.","operationId":"environment_users_password_reset_send","x-action":"users.password_reset.send","x-scope":"users:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users/{id}/reactivate":{"post":{"tags":["Environment › Users"],"summary":"Reactivate a deactivated user so they can sign in again. Grants revoked on deactivation stay revoked.","description":"Requires scope `users:write`. Danger: write.","operationId":"environment_users_reactivate","x-action":"users.reactivate","x-scope":"users:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users/{id}/sessions":{"get":{"operationId":"environment_users_sessions_list","x-action":"users.sessions.list","tags":["Environment › Users"],"summary":"List a user's live sign-in sessions","description":"Requires scope `users:read`. The fifty most recently active, newest first — enough to\nrecognise a device and end one (`DELETE /users/{id}/sessions/{session_id}`), not a log.\n`impersonation` marks a session somebody else opened as this person.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserSession"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"x-scope":"users:read","x-scope-aliases":[],"x-danger":"read"},"delete":{"tags":["Environment › Users"],"summary":"Sign a user out everywhere: end every session and revoke every OAuth grant they hold.","description":"Requires scope `users:write`. Danger: destructive.","operationId":"environment_users_sessions_revoke_all","x-action":"users.sessions.revoke_all","x-scope":"users:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users/{id}/sms-factor":{"delete":{"tags":["Environment › Users"],"summary":"Remove a user's phone number for text-message sign-in codes. Their other factors and recovery codes stay.","description":"Requires scope `users:write`. Danger: critical.","operationId":"environment_users_mfa_sms_remove","x-action":"users.mfa.sms.remove","x-scope":"users:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users/{id}/verification":{"post":{"tags":["Environment › Users"],"summary":"Mail a user the link that verifies their email address. Does nothing for an address already verified.","description":"Requires scope `users:write`. Danger: write.","operationId":"environment_users_verification_send","x-action":"users.verification.send","x-scope":"users:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/users/{id}/verify":{"post":{"tags":["Environment › Users"],"summary":"Mark a user's email address verified without the emailed link. It can then be used to recover the account.","description":"Requires scope `users:write`. Danger: critical.","operationId":"environment_users_verify","x-action":"users.verify","x-scope":"users:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The user id.","maxLength":64}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/vault-secret-grants/{id}":{"delete":{"tags":["Environment › Token vault"],"summary":"Withdraw an app's right to lease a stored credential.","description":"Requires scope `token_vault:write`. Danger: destructive.","operationId":"environment_token_vault_grants_delete","x-action":"token_vault.grants.delete","x-scope":"token_vault:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"required":true,"schema":{"type":"string","description":"The secret's id."},"name":"secret_id","in":"query"},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The OAuth client id whose grant is withdrawn.","maxLength":190}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization whose vault this is. Left out: the environment's own secrets, a separate collection.","maxLength":64}}}}}},"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/vault-secrets":{"get":{"tags":["Environment › Token vault"],"summary":"List the downstream credentials stored in an organization's token vault (or the environment's own): names, providers, status. Never a value.","description":"Requires scope `token_vault:read`. Danger: read.","operationId":"environment_token_vault_secrets_list","x-action":"token_vault.secrets.list","x-scope":"token_vault:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"The organization whose vault this is. Left out: the environment's own secrets, a separate collection.","maxLength":64}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TokenVaultSecret"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Token vault"],"summary":"Store a downstream credential (a third-party API key) in an organization's token vault, or the environment's own. The value is sealed and never returned.","description":"Requires scope `token_vault:write`. Danger: write.","operationId":"environment_token_vault_secrets_create","x-action":"token_vault.secrets.create","x-scope":"token_vault:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization whose vault this is. Left out: the environment's own secrets, a separate collection.","maxLength":64},"name":{"type":"string","description":"What it is: \"Stripe live key\".","maxLength":190},"provider":{"type":"string","description":"Whose credential it is: \"stripe\", \"openai\".","maxLength":190},"secret":{"type":"string","description":"The credential. Write-only: sealed, never returned.","maxLength":20000}},"required":["name","provider","secret"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TokenVaultSecret"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/vault-secrets/{id}":{"get":{"tags":["Environment › Token vault"],"summary":"Read one stored credential and the client ids granted to lease it. Never its value.","description":"Requires scope `token_vault:read`. Danger: read.","operationId":"environment_token_vault_secrets_get","x-action":"token_vault.secrets.get","x-scope":"token_vault:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The secret's id."}},{"name":"organization_id","in":"query","required":false,"schema":{"type":["string","null"],"description":"The organization whose vault this is. Left out: the environment's own secrets, a separate collection.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TokenVaultSecret"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Token vault"],"summary":"Revoke a stored credential permanently. No app can lease it again.","description":"Requires scope `token_vault:write`. Danger: destructive.","operationId":"environment_token_vault_secrets_revoke","x-action":"token_vault.secrets.revoke","x-scope":"token_vault:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The secret's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization whose vault this is. Left out: the environment's own secrets, a separate collection.","maxLength":64}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TokenVaultSecret"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/vault-secrets/{id}/grants":{"post":{"tags":["Environment › Token vault"],"summary":"Grant an app (by OAuth client id) the right to lease a stored credential.","description":"Requires scope `token_vault:write`. Danger: critical.","operationId":"environment_token_vault_grants_create","x-action":"token_vault.grants.create","x-scope":"token_vault:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The secret's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization whose vault this is. Left out: the environment's own secrets, a separate collection.","maxLength":64},"client_id":{"type":"string","description":"The OAuth client id of the app that may lease it.","maxLength":190}},"required":["client_id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TokenVaultSecret"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/vault-secrets/{id}/lease":{"post":{"tags":["Environment › Token Vault"],"summary":"Redeem a grant for the plaintext secret","description":"The only endpoint that reveals a secret. Every refusal — unknown secret, revoked,\nexpired, or no live grant — is the SAME 403 with no detail, so a caller cannot\nuse it to enumerate what exists.\n","security":[{"AgentToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["purpose"],"properties":{"purpose":{"type":"string","maxLength":200,"description":"Recorded on the audit trail."}}}}}},"responses":{"200":{"description":"Leased.","content":{"application/json":{"schema":{"type":"object","required":["secret_id","provider","secret","expires_at"],"properties":{"secret_id":{"type":"string"},"provider":{"type":"string","description":"The downstream provider the secret belongs to."},"secret":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}}}}}},"401":{"$ref":"#/components/responses/BearerUnauthorized"},"403":{"description":"Lease denied. Deliberately uniform — unknown secret, revoked, expired and\nungranted are ONE response, with a constant message, so it cannot be used to\nenumerate. A token missing the `vault.lease` scope is an RFC 6750 challenge\ninstead, and is distinguishable only because it never reaches the vault.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/v1/vault-secrets/{id}/rotate":{"post":{"tags":["Environment › Token vault"],"summary":"Replace a stored credential's value. Every later lease hands out the new one. The value is never returned.","description":"Requires scope `token_vault:write`. Danger: critical.","operationId":"environment_token_vault_secrets_rotate","x-action":"token_vault.secrets.rotate","x-scope":"token_vault:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The secret's id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"The organization whose vault this is. Left out: the environment's own secrets, a separate collection.","maxLength":64},"secret":{"type":"string","description":"The new value. Write-only: sealed, never returned.","maxLength":20000}},"required":["secret"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TokenVaultSecret"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks":{"get":{"tags":["Environment › Webhooks"],"summary":"List the webhook endpoints registered in this environment: URL, owner, subscribed events and whether each is active.","description":"Requires scope `webhooks:read`. Danger: read.","operationId":"environment_webhooks_list","x-action":"webhooks.list","x-scope":"webhooks:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Items per page, 1–100. Default 50."}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"The `next_cursor` of the previous page."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/List"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"tags":["Environment › Webhooks"],"summary":"Register a webhook endpoint for one organization or the whole environment. Returns its signing secret once.","description":"Requires scope `webhooks:write`. Danger: critical.","operationId":"environment_webhooks_create","x-action":"webhooks.create","x-scope":"webhooks:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"A public HTTPS URL. Signed deliveries are POSTed here.","format":"uri","maxLength":500},"event_types":{"type":"array","description":"The events it receives.","minItems":1,"items":{"type":"string","enum":["user.created","user.updated","user.preferences.updated","user.metadata.updated","user.deactivated","user.login","user.reactivated","identity.linked","user.erased","organization.created","organization.suspended","organization.reactivated","organization.updated","organization.deleted","membership.created","membership.updated","membership.deleted","invitation.created","invitation.accepted","invitation.revoked","role.assigned","role.unassigned","role.assigned_everywhere","role.unassigned_everywhere","api_key.created","api_key.revoked","support_session.started","directory.user.provisioned","directory.user.deprovisioned","directory.user.deactivated","directory.group.membership_changed","domain.added","domain.removed","domain.verified","connection.activated","connection.certificate_expiring","entitlement.set","entitlement.updated","entitlement.revoked","vault.grant.created","vault.grant.revoked","vault.secret.revoked","pipe.connection.connected","pipe.connection.needs_reauth","pipe.connection.disconnected","governance.access.revoked","feature_flag.created","feature_flag.updated","feature_flag.deleted"]}},"signature_scheme":{"type":"string","description":"How deliveries are signed: `cbox` (X-Cbox-Signature, the default) or `standard_webhooks` (webhook-id / webhook-timestamp / webhook-signature, verifiable with any Standard Webhooks library; the secret is a `whsec_` secret).","enum":["cbox","standard_webhooks"]},"organization_id":{"type":["string","null"],"description":"The organization it belongs to; it carries that organization's traffic only. Send this or environment_wide.","maxLength":64},"environment_wide":{"type":"boolean","description":"True to make it the environment's own, carrying EVERY organization's traffic. Send this or organization_id."}},"required":["url","event_types"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{id}":{"get":{"tags":["Environment › Webhooks"],"summary":"Get one webhook endpoint: URL, owner, subscribed events, health. Never its signing secret.","description":"Requires scope `webhooks:read`. Danger: read.","operationId":"environment_webhooks_get","x-action":"webhooks.get","x-scope":"webhooks:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The webhook endpoint id."}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["Environment › Webhooks"],"summary":"Change a webhook endpoint's URL and/or the events it subscribes to.","description":"Requires scope `webhooks:write`. Danger: write.","operationId":"environment_webhooks_update","x-action":"webhooks.update","x-scope":"webhooks:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The webhook endpoint id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"A public HTTPS URL. Left out, unchanged.","format":"uri","maxLength":500},"event_types":{"type":"array","description":"The COMPLETE set of events afterwards. Left out, unchanged.","minItems":1,"items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"tags":["Environment › Webhooks"],"summary":"Delete a webhook endpoint. It stops receiving events at once.","description":"Requires scope `webhooks:write`. Danger: destructive.","operationId":"environment_webhooks_delete","x-action":"webhooks.delete","x-scope":"webhooks:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The webhook endpoint id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"204":{"description":"Done."},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{id}/pause":{"post":{"tags":["Environment › Webhooks"],"summary":"Pause a webhook endpoint: it stops receiving events until resumed.","description":"Requires scope `webhooks:write`. Danger: write.","operationId":"environment_webhooks_pause","x-action":"webhooks.pause","x-scope":"webhooks:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The webhook endpoint id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{id}/resume":{"post":{"tags":["Environment › Webhooks"],"summary":"Resume a paused webhook endpoint: it receives events again.","description":"Requires scope `webhooks:write`. Danger: write.","operationId":"environment_webhooks_resume","x-action":"webhooks.resume","x-scope":"webhooks:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The webhook endpoint id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{id}/rotate":{"post":{"tags":["Environment › Webhooks"],"summary":"Issue a new signing secret for a webhook endpoint, returned once. The old secret stops verifying immediately.","description":"Requires scope `webhooks:write`. Danger: critical.","operationId":"environment_webhooks_secret_rotate","x-action":"webhooks.secret.rotate","x-scope":"webhooks:write","x-scope-aliases":[],"x-danger":"critical","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The webhook endpoint id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{id}/signature-scheme":{"post":{"tags":["Environment › Webhooks"],"summary":"Change how a webhook endpoint's deliveries are signed (cbox or standard_webhooks). No new secret is issued: a hex secret is used as whsec_ + base64 of itself. Update the receiver first.","description":"Requires scope `webhooks:write`. Danger: destructive.","operationId":"environment_webhooks_signature_scheme_change","x-action":"webhooks.signature_scheme.change","x-scope":"webhooks:write","x-scope-aliases":[],"x-danger":"destructive","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The webhook endpoint id."}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signature_scheme":{"type":"string","description":"The scheme deliveries are signed with from the next attempt. The secret is unchanged: under `standard_webhooks` a 64-hex secret is used as `whsec_` + base64 of the hex string. Update the receiver before you switch.","enum":["cbox","standard_webhooks"]}},"required":["signature_scheme"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/whitelabel":{"get":{"tags":["Environment › Branding"],"summary":"Read the white-label branding (palette, app name, email sender, logo) of the environment default or one organization.","description":"Requires scope `branding:read`. Danger: read.","operationId":"environment_branding_whitelabel_get","x-action":"branding.whitelabel.get","x-scope":"branding:read","x-scope-aliases":[],"x-danger":"read","parameters":[{"name":"organization_id","in":"query","required":false,"schema":{"type":"string","description":"Read this organization's branding. Left out, the environment default.","maxLength":64}},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WhitelabelBranding"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["Environment › Branding"],"summary":"Save the white-label branding (palette, app name, email sender, welcome email) of the environment default or one organization.","description":"Requires scope `branding:write`. Danger: write.","operationId":"environment_branding_whitelabel_set","x-action":"branding.whitelabel.set","x-scope":"branding:write","x-scope-aliases":[],"x-danger":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/CboxApproval"},{"$ref":"#/components/parameters/CboxEnvironment"},{"name":"Cbox-Organization","in":"header","required":false,"description":"Select the exact organization for a platform-root user token. Required when an unbound token can access multiple organizations. Must match an organization-bound token or organization key; never changes the credential authority.","schema":{"type":"string","minLength":1}}],"security":[{"EnvironmentApiKey":[]},{"ManagementAccessToken":[]},{"WorkspaceAccessToken":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"organization_id":{"type":["string","null"],"description":"Brand this organization. Left out, the environment default.","maxLength":64},"palette":{"type":"object","description":"Colours as hex (#0a2540) or oklch(…), by token: primary, accent, ring, foreground, background. Sent, it is the complete palette; a token left out or blank is unset.","properties":{"primary":{"type":["string","null"],"maxLength":100},"accent":{"type":["string","null"],"maxLength":100},"ring":{"type":["string","null"],"maxLength":100},"foreground":{"type":["string","null"],"maxLength":100},"background":{"type":["string","null"],"maxLength":100}}},"app_name":{"type":["string","null"],"description":"The product name shown in place of Cbox ID; null to unset.","maxLength":120},"email_from_name":{"type":["string","null"],"description":"The sender name on mail; null to unset.","maxLength":120},"email_template":{"type":["string","null"],"description":"The welcome email body; blank or null to use the default.","maxLength":5000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WhitelabelBranding"},{"type":"object","required":["object"],"properties":{"object":{"type":"string"}}}]}}}},"202":{"$ref":"#/components/responses/ApprovalRequired"},"400":{"$ref":"#/components/responses/EnvironmentRequired"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"description":"Product admission could not be verified. The request is refused; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"schemas":{"OrganizationServiceGrant":{"type":"object","required":["id","organization_id","service","consumer_client_id","audience","scopes","revoked_at"],"properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"service":{"type":"string"},"consumer_client_id":{"type":"string"},"audience":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"revoked_at":{"type":["string","null"],"format":"date-time"}}},"UserPropertySnapshot":{"type":"object","required":["user_id","namespace","data","version"],"additionalProperties":false,"properties":{"user_id":{"type":"string"},"namespace":{"type":"string"},"data":{"type":"object","additionalProperties":true},"version":{"type":"integer","minimum":0},"object":{"type":"string"}}},"ManagementKey":{"type":"object","description":"A management key of this environment. `token` is present once, on the answer that minted it, and never again.","required":["id","name","prefix","scopes","active","created_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"prefix":{"type":"string","description":"The key's first characters, to recognise it by."},"scopes":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"parent_key_id":{"type":["string","null"],"description":"The key that minted this one, if a key did."},"rotated_from_id":{"type":["string","null"],"description":"The key this one replaced, if it came from a rotation."},"require_approval":{"description":"The approval policy: actions held for the person behind the key.","oneOf":[{"type":"object","properties":{"min_danger":{"type":["string","null"],"enum":["read","write","destructive","critical",null]},"actions":{"type":"array","items":{"type":"string"}}}},{"type":"null"}]},"created_by":{"oneOf":[{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":["string","null"]}}},{"type":"null"}]},"expires_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"token":{"type":["string","null"],"description":"The key's value. Only on the answer that minted it; null on an idempotent replay of that answer, because the value is never stored."}}},"LegacyLoginProbe":{"type":"object","required":["result"],"properties":{"result":{"type":"string","description":"What the declared legacy-login endpoint answered for the address, in words."}}},"ManifestSync":{"type":"object","required":["unchanged","roles_declared","permissions_declared","orphaned_role_keys","orphaned_permission_keys"],"properties":{"unchanged":{"type":"boolean","description":"The manifest matched what is already stored."},"roles_declared":{"type":"integer"},"permissions_declared":{"type":"integer"},"orphaned_role_keys":{"type":"array","items":{"type":"string"},"description":"Roles stored here that the manifest no longer declares."},"orphaned_permission_keys":{"type":"array","items":{"type":"string"}}}},"SmsFactorPolicy":{"type":"object","required":["enabled","allowed_countries","privileged_need_stronger_factor","deployment_countries"],"properties":{"enabled":{"type":"boolean","description":"Text-message codes are accepted as a second factor. Off by default."},"allowed_countries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"},"description":"ISO 3166-1 alpha-2 countries whose numbers may enrol and be texted. Re-checked at every send."},"privileged_need_stronger_factor":{"type":"boolean","description":"Administrators may add SMS only beside an authenticator app or a passkey."},"deployment_countries":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"},"description":"The deployment's ceiling (CBOX_ID_SMS_ALLOWED_COUNTRIES). Empty: no deployment restriction. A listed country outside it is never texted."}}},"SelfServiceSignup":{"type":"object","required":["enabled","decided_here"],"properties":{"enabled":{"type":"boolean"},"decided_here":{"type":"boolean","description":"False on a single-tenant install, where sign-up follows CBOX_ID_SIGNUP_MODE and the switch changes nothing."}}},"SignInThrough":{"type":"object","required":["connection_id","connection_name","login_url","direct_login_url"],"properties":{"connection_id":{"type":["string","null"],"description":"The OpenID Connect connection /login sends everybody to. Null: the environment's own sign-in page."},"connection_name":{"type":["string","null"]},"login_url":{"type":"string","format":"uri","description":"The sign-in address: a redirect to the connection when one is set."},"direct_login_url":{"type":"string","format":"uri","description":"The environment's own sign-in page, always — the way in when the connection's provider is down."}}},"Device":{"type":"object","required":["id","install_id","platform","name","status"],"properties":{"id":{"type":"string"},"install_id":{"type":"string"},"platform":{"type":"string","enum":["ios","android"]},"name":{"type":"string"},"status":{"type":"string","enum":["active","retired"],"description":"Operator/user INTENT, not delivery health. A device can be active and\ncurrently failing, or retired and perfectly reachable.\n"},"app_version":{"type":["string","null"]},"os_version":{"type":["string","null"]},"model":{"type":["string","null"]},"last_seen_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}}},"Approval":{"type":"object","required":["id","client_id","client_name","scopes"],"properties":{"id":{"type":"string","description":"The INTERNAL request id. Never `auth_req_id`, which is the initiating\nclient's polling secret and is stored only as a SHA-256 hash — a client must\nnot be able to approve its own request.\n"},"client_id":{"type":"string"},"client_name":{"type":"string"},"binding_message":{"type":["string","null"],"description":"The transaction description the user compares against what the requesting app\nshowed them. This is the anti-phishing primitive, and the reason approvals are\nfetched rather than pushed.\n"},"scopes":{"type":"array","items":{"type":"object","required":["scope","label"],"properties":{"scope":{"type":"string"},"label":{"type":"string","description":"Human wording, identical to the console."}}}},"organization_id":{"type":["string","null"]},"requested_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","approved","denied","expired","reported"]},"purpose":{"type":"string"}}},"ApprovalDecision":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["approved","denied","reported"]}}},"VaultSecret":{"type":"object","required":["id","name","provider","revoked"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"owner_type":{"type":["string","null"],"enum":["organization","user",null]},"owner_id":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"revoked":{"type":"boolean","description":"Whether the secret has been revoked."}}},"Organization":{"type":"object","required":["id","name","slug","type","status"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"type":"string","enum":["customer","reseller"]},"status":{"type":"string","enum":["active","suspended","deleted"]},"parent_id":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Free-form text values kept on the organization; null when there are none."}}},"OrganizationDomain":{"type":"object","required":["id","organization_id","domain","verified","capture","record_name","record_value"],"properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"domain":{"type":"string","description":"An email domain the organization claims, like acme.com."},"verified":{"type":"boolean"},"verified_at":{"type":["string","null"],"format":"date-time"},"capture":{"type":"boolean","description":"Whether everyone signing in with an address here is routed to the organization's SSO."},"record_name":{"type":"string","description":"Where to publish the DNS TXT record that proves the claim."},"record_value":{"type":"string","description":"What to publish there."}}},"AssignableMemberRole":{"type":"string","enum":["admin","member"],"default":"member","description":"The built-in tiers this deployment hands out. `owner` is never assigned — ownership\nmoves with `transfer-ownership`.\n"},"Member":{"type":"object","required":["id","user_id","organization_id","role","status"],"properties":{"id":{"type":"string","description":"The membership's own id. Address a member by `user_id`."},"user_id":{"type":"string"},"organization_id":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","member","viewer"]},"status":{"type":"string","enum":["active","invited","suspended"]},"email":{"type":["string","null"]},"name":{"type":["string","null"]},"joined_at":{"type":["string","null"],"format":"date-time"}}},"Invitation":{"type":"object","required":["id","organization_id","email","role","roles","status"],"properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["owner","admin","developer","member","viewer"]},"roles":{"type":"array","description":"Ids of the access roles granted when the invitation is accepted.","items":{"type":"string"}},"accepted_by":{"type":["string","null"],"description":"The subject that accepted this invitation. Null for pending or historical invitations without a receipt."},"accepted_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","accepted","revoked"]},"client_id":{"type":["string","null"],"description":"The app it came from."},"return_to":{"type":["string","null"],"description":"Where the person is sent after accepting."},"invited_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"}}},"Role":{"type":"object","required":["id","name","tenant_assignable","permissions"],"properties":{"id":{"type":"string"},"key":{"type":["string","null"],"description":"The app's manifest key; null for a role made in the console."},"name":{"type":"string"},"description":{"type":["string","null"]},"client_id":{"type":["string","null"],"description":"The app that declared it; null for an app-agnostic role."},"organization_id":{"type":["string","null"],"description":"Set only for a role one organization made for itself."},"tenant_assignable":{"type":"boolean","description":"`false` marks a STAFF role: an organization's own administrators can never grant\nit, nor can an invitation carry it. This API can — see the role endpoints.\n"},"permissions":{"type":"array","items":{"type":"string"}},"active_definition_version":{"type":["string","null"],"description":"The activated app definition. Publishing a new manifest does not change existing holders' permissions."},"pending_definition":{"type":["object","null"],"description":"A published change waiting for an environment administrator to explicitly activate this version.","required":["version","permissions","tenant_assignable"],"properties":{"version":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"tenant_assignable":{"type":"boolean"}}}}},"RoleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignment"}},"RoleAssignment":{"type":"object","required":["role_id","name","user_id","source"],"properties":{"role_id":{"type":"string"},"key":{"type":["string","null"]},"name":{"type":"string"},"client_id":{"type":["string","null"]},"tenant_assignable":{"type":"boolean"},"user_id":{"type":"string"},"organization_id":{"type":["string","null"],"description":"The organization it is held in; null for an environment-wide (staff) grant."},"source":{"type":"string","enum":["manual","pushed","system"]}}},"App":{"type":"object","required":["id","client_id","name","type","client_type","grant_types","redirect_uris","scopes","first_party"],"properties":{"id":{"type":"string"},"client_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["web","spa","cli","service","agent","advanced"],"description":"The kind, read back from its grants; `advanced` when they match no preset."},"client_type":{"type":"string","enum":["confidential","public"]},"organization_id":{"type":["string","null"]},"first_party":{"type":"boolean"},"grant_types":{"type":"array","items":{"type":"string"}},"redirect_uris":{"type":"array","items":{"type":"string"}},"post_logout_redirect_uris":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"manifest_url":{"type":["string","null"],"description":"Where it publishes its roles-and-permissions manifest."},"access_token_ttl":{"type":["integer","null"],"description":"Its access-token lifetime in seconds; null for the install's default."},"backchannel_logout_uri":{"type":["string","null"],"description":"Where it is sent a logout token (OIDC Back-Channel Logout); null when it is not told."},"backchannel_logout_session_required":{"type":"boolean"},"api_key_prefix":{"type":["string","null"],"description":"The prefix of its customer API keys; null when it accepts none."},"created_at":{"type":["string","null"],"format":"date-time"},"client_secret":{"type":["string","null"],"description":"Only on the response that created (or copied) the app, and only for an app that authenticates with a secret. Never again — null on an idempotent replay."}}},"AppSecret":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"hint":{"type":["string","null"],"description":"The characters the secret ends in; null for one older than per-secret storage."},"created_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Set on a secret a rotation replaced — it stops working then."},"last_used_at":{"type":["string","null"],"format":"date-time"},"client_secret":{"type":["string","null"],"description":"Only on the rotation that minted it. Never again — null on an idempotent replay."},"previous_expire_at":{"type":["string","null"],"format":"date-time","description":"On a rotation — when the secrets it replaced stop working."}}},"AppBlueprint":{"type":"object","description":"An app's configuration without its identity or credentials — deterministic (lists\nsorted), versioned, and refused rather than half-read when it carries a key this\nserver does not know.\n","required":["kind","version","name","client_type"],"additionalProperties":false,"properties":{"kind":{"type":"string","const":"cbox-id.client-blueprint"},"version":{"type":"integer","const":1},"name":{"type":"string"},"client_type":{"type":"string","enum":["confidential","public"]},"token_endpoint_auth_method":{"type":["string","null"]},"grant_types":{"type":"array","items":{"type":"string"}},"redirect_uris":{"type":"array","items":{"type":"string"}},"post_logout_redirect_uris":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"first_party":{"type":"boolean"},"manifest_url":{"type":["string","null"]},"access_token_ttl":{"type":["integer","null"]},"backchannel_logout_uri":{"type":["string","null"]},"backchannel_logout_session_required":{"type":"boolean"},"api_key_prefix":{"type":["string","null"]},"object":{"type":"string"}}},"ApiScope":{"type":"object","required":["key"],"properties":{"key":{"type":"string","maxLength":128},"description":{"type":["string","null"],"maxLength":255},"tenant_requestable":{"type":"boolean","default":true,"description":"Whether apps an organization owns may be granted it; false keeps it for the environment's own apps."}}},"Api":{"type":"object","required":["id","identifier","name","scopes"],"properties":{"id":{"type":"string"},"identifier":{"type":"string","description":"Absolute URI; the token's `aud`."},"name":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null when the environment owns it."},"client_id":{"type":["string","null"],"description":"The app whose roles and permissions it enforces."},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ApiScope"}},"created_at":{"type":["string","null"],"format":"date-time"}}},"Webhook":{"type":"object","required":["id","url","organization_id","event_types","active","signature_scheme"],"properties":{"id":{"type":"string"},"url":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null when the environment owns it: it receives EVERY organization's events."},"event_types":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean","description":"false while paused."},"signature_scheme":{"type":"string","enum":["cbox","standard_webhooks"],"description":"How deliveries are signed. `cbox`: `X-Cbox-Timestamp` and\n`X-Cbox-Signature: t=,v1=.\">`.\n`standard_webhooks`: `webhook-id`, `webhook-timestamp` and\n`webhook-signature: v1,..\">`, verifiable\nwith any Standard Webhooks library. Only the chosen scheme's headers are sent.\n"},"consecutive_failures":{"type":"integer"},"last_success_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"secret":{"type":["string","null"],"description":"The signing secret, on the create and rotate answers only — shown once, never\nretrievable again. `null` on an idempotent replay of that answer. 64 hex\ncharacters under `cbox`; a `whsec_` secret under `standard_webhooks`.\n"}}},"InlineHook":{"type":"object","required":["id","url","hook_point","organization_id","active"],"properties":{"id":{"type":"string"},"url":{"type":"string"},"hook_point":{"type":"string","enum":["token_minting","post_login","pre_registration","post_registration","pre_password_change","post_password_change"]},"organization_id":{"type":["string","null"],"description":"null when the environment owns it: it runs for EVERY organization."},"active":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"secret":{"type":["string","null"],"description":"The signing secret, on the create answer only — shown once. `null` on an idempotent replay."}}},"LogStream":{"type":"object","required":["id","name","destination","endpoint_url","auth","options","external_id","organization_id","enabled","health"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"destination":{"type":"string","enum":["splunk_hec","elastic_ecs","graylog_gelf","cef_http","generic_json","datadog","s3","gcs"]},"endpoint_url":{"type":"string","description":"Where entries go. For Datadog, S3 and GCS, derived from the site or region unless a custom endpoint was given."},"auth":{"type":"string","enum":["none","bearer","splunk","hmac"],"description":"An HTTP collector's scheme; `none` for the cloud destinations, which authenticate their own way."},"options":{"type":["object","null"],"description":"Datadog, S3 and GCS: the destination's settings, as stored. Never a credential — the API key, secret access key or service-account key is the encrypted secret. null for an HTTP collector.","properties":{"site":{"type":"string","enum":["datadoghq.com","us3.datadoghq.com","us5.datadoghq.com","datadoghq.eu","ap1.datadoghq.com","ap2.datadoghq.com","ddog-gov.com"]},"service":{"type":"string"},"source":{"type":"string"},"hostname":{"type":"string"},"tags":{"type":"string","description":"Comma-separated `key:value` tags (`ddtags`)."},"bucket":{"type":"string"},"region":{"type":"string"},"prefix":{"type":"string"},"access_key_id":{"type":"string"},"role_arn":{"type":"string"},"external_id":{"type":"string"},"sse":{"type":"string","enum":["AES256","aws:kms"]},"kms_key_id":{"type":"string"},"path_style":{"type":"boolean"},"gzip":{"type":"boolean"}}},"external_id":{"type":["string","null"],"description":"An assumed-role S3 stream's external ID, generated for it: the role's trust policy must require it (`sts:ExternalId`). null otherwise."},"organization_id":{"type":["string","null"],"description":"null when the environment owns it: it carries EVERY organization's entries."},"enabled":{"type":"boolean"},"health":{"type":"string","enum":["healthy","degraded","paused","action_required"],"description":"`degraded`: recent transient failures, still retrying. `paused`: the circuit is open after repeated failures and resumes on its own. `action_required`: the destination refused the credential or the settings — update the stream, or run a successful test."},"consecutive_failures":{"type":"integer"},"last_success_at":{"type":["string","null"],"format":"date-time"},"last_error":{"type":["string","null"],"description":"The latest failure, scrubbed of the stream's secret."},"last_failure_kind":{"type":["string","null"],"enum":["transient","authentication","configuration",null]},"last_failure_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"secret":{"type":["string","null"],"description":"A generated HMAC key, on the answer that generated it only — shown once. `null` on an idempotent replay. A credential the caller supplied is never echoed."}}},"DomainEvent":{"type":"object","required":["id","type","organization_id","occurred_at","payload"],"properties":{"id":{"type":"string","description":"A ULID; pass the last one you saw as `after`."},"type":{"type":"string","description":"e.g. `user.created` — the webhook event name."},"organization_id":{"type":["string","null"]},"occurred_at":{"type":["string","null"],"format":"date-time"},"payload":{"type":"object"}}},"AuditEntry":{"type":"object","required":["id","action","actor_type","actor_id","organization_id","target_type","target_id","context","recorded_at"],"properties":{"id":{"type":"string","description":"A ULID; pass the last one you saw as `after`."},"action":{"type":"string","description":"e.g. `webhook.created`."},"actor_type":{"type":"string","enum":["user","service","system","operator","organization_member"]},"actor_id":{"type":["string","null"],"description":"For `service`, the management key's or app's id."},"organization_id":{"type":["string","null"]},"target_type":{"type":["string","null"]},"target_id":{"type":["string","null"]},"context":{"type":"object"},"ip":{"type":["string","null"]},"recorded_at":{"type":["string","null"],"format":"date-time"}}},"ApiKey":{"type":"object","required":["id","prefix","organization_id","user_id","client_id","permissions","status","revoked"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"prefix":{"type":"string","description":"What a person recognises the key by. Never the key."},"organization_id":{"type":"string"},"user_id":{"type":"string","description":"Its holder."},"client_id":{"type":"string","description":"The app whose API it is for."},"permissions":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","expired","revoked"]},"revoked":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"}}},"SupportSession":{"type":"object","required":["id","user_id","organization_id","client_id","actor_id","act","reason","scopes","expires_at"],"properties":{"id":{"type":"string"},"user_id":{"type":"string","description":"The customer's user being acted as."},"organization_id":{"type":"string"},"client_id":{"type":"string"},"actor_id":{"type":"string"},"act":{"type":"object","required":["sub"],"description":"The RFC 8693 actor claim every token of the session carries.","properties":{"sub":{"type":"string"}}},"reason":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"},"code":{"type":["string","null"],"description":"The first authorization code, when `redirect_uri` and `code_challenge` were sent. Shown once."},"redirect_uri":{"type":["string","null"]}}},"ApiKeyVerificationRequest":{"type":"object","required":["key"],"properties":{"key":{"type":"string","description":"The API key your API was presented with."},"client_id":{"type":"string","description":"For `client_secret_post`."},"client_secret":{"type":"string","description":"For `client_secret_post`."},"client_assertion_type":{"type":"string","description":"For `private_key_jwt`."},"client_assertion":{"type":"string","description":"For `private_key_jwt`."}}},"ApiKeyVerification":{"type":"object","required":["active"],"properties":{"active":{"type":"boolean"},"key_id":{"type":"string"},"sub":{"type":"string","description":"The key's holder."},"org":{"type":"string"},"org_role":{"type":["string","null"],"enum":["owner","admin","developer","member","viewer",null]},"permissions":{"type":"array","items":{"type":"string"}},"client_id":{"type":"string"},"expires_at":{"type":["string","null"],"format":"date-time"}}},"OAuthClientError":{"type":"object","required":["error"],"description":"RFC 6749 §5.2 — the OAuth error shape, not this API's `{error, message}` envelope.","properties":{"error":{"type":"string","enum":["invalid_client"]},"error_description":{"type":"string"}}},"User":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["active","disabled","locked"]},"email_verified_at":{"type":["string","null"],"format":"date-time"}}},"UserSession":{"type":"object","required":["id","expires_at","impersonation"],"properties":{"id":{"type":"string"},"user_agent":{"type":["string","null"]},"ip":{"type":["string","null"]},"last_active_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"impersonation":{"type":"boolean","description":"Somebody else opened it as this person."}}},"Permission":{"type":"object","required":["id","name","manual","tenant_assignable","orphaned"],"properties":{"id":{"type":"string"},"name":{"type":"string","description":"The `feature:action` key an app reads out of a token."},"description":{"type":["string","null"]},"client_id":{"type":["string","null"],"description":"The app that declared it; null for one authored here."},"organization_id":{"type":["string","null"],"description":"Set for one organization's own; null for the shared tier."},"tenant_assignable":{"type":"boolean","description":"Whether organizations may compose it into their own roles."},"manual":{"type":"boolean","description":"Authored here rather than declared by an app."},"orphaned":{"type":"boolean","description":"Its app stopped declaring it."}}},"SignInRules":{"type":"object","required":["min_length","require_breach_check","max_age_days","reuse_history","mfa","sso","lockout_threshold","passkeys","magic_link","session_idle_minutes","session_absolute_minutes","bot_challenge"],"properties":{"min_length":{"type":"integer","description":"Minimum password length."},"require_breach_check":{"type":"boolean","description":"Passwords found in known breaches are refused."},"max_age_days":{"type":["integer","null"],"description":"Days before a password must be changed; null for no limit."},"reuse_history":{"type":"integer","description":"Previous passwords that may not be reused."},"mfa":{"type":"string","enum":["off","optional","required"]},"sso":{"type":"string","enum":["off","preferred","required"],"description":"`required` refuses every other way in."},"lockout_threshold":{"type":["integer","null"],"description":"Failed attempts before a lockout; null for none."},"passkeys":{"type":"boolean","description":"Environment-wide. Whether passkeys may be used to sign in and be added. An organization's override never changes it."},"magic_link":{"type":"boolean","description":"Environment-wide. Whether a one-time sign-in link may be emailed."},"session_idle_minutes":{"type":["integer","null"],"description":"Environment-wide. Minutes of inactivity before a session ends; null for the deployment's."},"session_absolute_minutes":{"type":["integer","null"],"description":"Environment-wide. Minutes a session lasts at most; null for the deployment's."},"bot_challenge":{"type":"boolean","description":"Environment-wide. Whether a sign-up Radar flags is challenged with Turnstile, where the deployment has keys."}}},"SignInMethodsInForce":{"type":"object","required":["passkeys","magic_link","session_idle_minutes","session_absolute_minutes","bot_challenge"],"properties":{"passkeys":{"type":"boolean"},"magic_link":{"type":"boolean"},"session_idle_minutes":{"type":"integer","description":"0 for no idle timeout."},"session_absolute_minutes":{"type":"integer"},"bot_challenge":{"type":"boolean"}}},"SignInPolicy":{"type":"object","required":["organization_id","policy","baseline","override","inheriting","in_force","deployment"],"properties":{"organization_id":{"type":["string","null"],"description":"null for the environment baseline."},"policy":{"$ref":"#/components/schemas/SignInRules","description":"What is in force at this level: the baseline, or the organization's override tightened over it."},"baseline":{"$ref":"#/components/schemas/SignInRules"},"override":{"description":"What the organization stored itself; null when it inherits (and always for the baseline).","oneOf":[{"$ref":"#/components/schemas/SignInRules"},{"type":"null"}]},"inheriting":{"type":"boolean","description":"True for an organization with no override of its own."},"in_force":{"$ref":"#/components/schemas/SignInMethodsInForce","description":"The environment-wide methods and session lengths actually in force, after the deployment's ceiling."},"deployment":{"$ref":"#/components/schemas/SignInMethodsInForce","description":"The deployment's ceiling: which methods it offers at all, the longest sessions it allows, and whether it has Turnstile keys."}}},"SocialProvider":{"type":"object","required":["id","organization_id","level","provider","name","protocol","status","enabled","scopes","callback_uri"],"description":"Its client secret and private key are write-only and never returned. An environment provider (`level: environment`) is offered on every organization's sign-in page unless the organization has its own for the same provider or turned it off.","properties":{"id":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null for the environment's own provider."},"level":{"type":"string","enum":["environment","organization"]},"enabled":{"type":"boolean","description":"False when it is turned off; its credentials are kept."},"scopes":{"type":"array","items":{"type":"string"},"description":"Extra scopes requested on top of the ones sign-in needs."},"provider":{"type":["string","null"],"description":"The catalogue key: google, github, apple…"},"name":{"type":"string"},"protocol":{"type":"string","enum":["oidc","oauth2"]},"status":{"type":"string"},"callback_uri":{"type":"string","description":"The redirect URI to register with the provider."},"created_at":{"type":["string","null"],"format":"date-time"}}},"OfferedSocialProviders":{"type":"object","required":["organization_id","providers","not_inherited"],"description":"The social login buttons one sign-in page shows, after inheritance.","properties":{"organization_id":{"type":["string","null"],"description":"null for the plain sign-in page, before anybody has said who they are."},"providers":{"type":"array","items":{"type":"object","required":["id","provider","name","source","callback_uri"],"properties":{"id":{"type":"string"},"provider":{"type":["string","null"]},"name":{"type":"string"},"source":{"type":"string","enum":["environment","organization"],"description":"`environment` when inherited; `organization` when the organization's own stands in its place."},"callback_uri":{"type":"string"}}}},"not_inherited":{"type":"array","items":{"type":"string"},"description":"The environment's providers this organization turned off for its page."}}},"FrontendKey":{"type":"object","required":["id","name","key","mode","origins","active"],"description":"A publishable key. Returned in full: it is public by design; the origins are the control.","properties":{"id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"mode":{"type":"string","enum":["test","live"]},"origins":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"}}},"SamlApp":{"type":"object","required":["id","entity_id","acs_url","name_id_format","name_id_attribute","attribute_mappings","want_authn_requests_signed","has_certificate","organization_id","status"],"description":"An application that trusts this environment as its SAML identity provider. Its certificate is write-only. An application owned by an organization is only ever asserted to that organization's active members; one with no organization is open to every person in the environment.","properties":{"id":{"type":"string"},"entity_id":{"type":"string"},"acs_url":{"type":"string"},"name_id_format":{"type":"string"},"name_id_attribute":{"type":"string"},"attribute_mappings":{"type":"array","items":{"type":"object","required":["attribute","field"],"properties":{"attribute":{"type":"string"},"field":{"type":"string"}}}},"want_authn_requests_signed":{"type":"boolean"},"has_certificate":{"type":"boolean"},"organization_id":{"type":["string","null"],"description":"The organization whose active members alone may sign in to it; null for an environment-wide application."},"status":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"ErasureReceipt":{"type":"object","required":["subject_id","erased_at","subject_pseudonymised","audit_entry_id","steps"],"description":"The record of one erasure (GDPR Art. 17): what each store did, in numbers. Carries no personal data — safe to log, file with your Art. 30 records, or hand to the person who asked.","properties":{"subject_id":{"type":"string","description":"The erased person's id. Kept: the row is pseudonymised in place, not deleted."},"erased_at":{"type":"string","format":"date-time"},"subject_pseudonymised":{"type":"boolean","description":"Whether the account row's email and name were replaced with placeholders."},"audit_entry_id":{"type":["string","null"],"description":"The `user.erased` tombstone on the audit trail."},"steps":{"type":"array","description":"One entry per store, in the order they ran — including stores that held nothing, so a receipt shows a store was checked.","items":{"type":"object","required":["step","counts","note"],"properties":{"step":{"type":"string","description":"The store, e.g. `identity.credentials`, `oauth.grants`, `devices.devices`."},"counts":{"type":"object","description":"What was removed or rewritten there, by item.","additionalProperties":{"type":"integer"}},"note":{"type":["string","null"],"description":"Why a step could not act, when it could not."}}}}}},"OnboardingProgress":{"type":"object","required":["version","workspace_id","project_id","environment_id","environment_type","observed_at","goals","first_sign_in_evidence","production_ready","guide_url"],"properties":{"version":{"type":"integer","const":1},"workspace_id":{"type":"string"},"project_id":{"type":"string"},"environment_id":{"type":"string"},"environment_type":{"type":"string"},"observed_at":{"type":"string","format":"date-time"},"goals":{"type":"object","additionalProperties":{"type":"boolean"}},"first_sign_in_evidence":{"type":"string"},"production_ready":{"type":"null"},"guide_url":{"type":["string","null"]}}},"LegacyLogin":{"type":"object","required":["declared","url","client_id","declared_by","approved","approved_at","approved_by"],"description":"The legacy sign-in endpoint an app declared for migration. Its shared secret is never returned.","properties":{"declared":{"type":"boolean"},"url":{"type":["string","null"]},"client_id":{"type":["string","null"],"description":"The app that declared it."},"declared_by":{"type":["string","null"],"description":"That app's name."},"approved":{"type":"boolean"},"approved_at":{"type":["string","null"],"format":"date-time"},"approved_by":{"type":["string","null"],"description":"The person or key that approved it."}}},"ThemeMode":{"type":"object","properties":{"primary":{"type":"string"},"background":{"type":"string"},"foreground":{"type":"string"},"muted":{"type":"string"}}},"Appearance":{"type":"object","required":["organization_id","customized","theme","logo","favicon","remote_logo_ignored"],"properties":{"organization_id":{"type":["string","null"],"description":"null for the environment default."},"customized":{"type":"boolean","description":"Whether this level has a theme of its own."},"theme":{"type":"object","properties":{"preset":{"type":"string"},"radius":{"type":"string"},"font":{"type":"string"},"light":{"$ref":"#/components/schemas/ThemeMode"},"dark":{"$ref":"#/components/schemas/ThemeMode"}}},"logo":{"type":["string","null"],"description":"The uploaded logo, served by this application at /brand-assets/…; null when none is uploaded at this level. Never a remote URL."},"favicon":{"type":["string","null"],"description":"The uploaded favicon, served the same way; null when none."},"remote_logo_ignored":{"type":"boolean","description":"A remote logo URL saved before logos became uploads is still stored at this level. It is never fetched and no longer shown on any hosted page; upload a logo (or send `logo: null`) to clear it."}}},"WhitelabelBranding":{"type":"object","required":["organization_id","palette","app_name","email_from_name","email_template","logo_url","favicon_url"],"properties":{"organization_id":{"type":["string","null"],"description":"null for the environment default."},"palette":{"type":"object","additionalProperties":{"type":["string","null"]}},"app_name":{"type":["string","null"]},"email_from_name":{"type":["string","null"]},"email_template":{"type":["string","null"]},"logo_url":{"type":["string","null"],"description":"Uploaded with `PUT /branding/appearance` (the console's Branding page)."},"favicon_url":{"type":["string","null"],"description":"Uploaded with `PUT /branding/appearance` (the console's Branding page)."}}},"CustomDomain":{"type":"object","required":["domain","verified_at","pending"],"properties":{"domain":{"type":["string","null"],"description":"The verified domain serving this environment."},"verified_at":{"type":["string","null"],"format":"date-time"},"pending":{"description":"A domain waiting for its DNS proof, and the TXT record to publish.","oneOf":[{"type":"object","required":["domain","record_name","record_value"],"properties":{"domain":{"type":"string"},"record_name":{"type":"string"},"record_value":{"type":"string"}}},{"type":"null"}]}}},"SsoConnection":{"type":"object","required":["id","organization_id","name","type","status","active","config"],"description":"A SAML or OIDC connection an organization signs in through. Its certificate, client secret and signing key are write-only.","properties":{"id":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null when the environment owns it: it signs people in and enrols them nowhere."},"name":{"type":"string"},"type":{"type":"string","enum":["saml","oidc","oauth2"]},"provider":{"type":["string","null"],"description":"The catalogue provider a social sign-in connection came from; null for an organization's own identity provider."},"status":{"type":"string","enum":["draft","active","inactive"]},"active":{"type":"boolean"},"complete":{"type":"boolean","description":"false for a draft created with pending_idp whose identity-provider details are still missing. Activation refuses it."},"config":{"type":"object","description":"The settings that are not secrets.","properties":{"idp_entity_id":{"type":"string"},"idp_sso_url":{"type":"string"},"sp_entity_id":{"type":"string"},"sp_acs_url":{"type":"string"},"issuer":{"type":"string"},"client_id":{"type":"string"}}},"service_provider":{"type":["object","null"],"description":"What to paste into the identity provider: this connection's own entity id, ACS URL and SP metadata URL (SAML), or its redirect URI (OIDC). null for a social sign-in connection.","properties":{"sp_entity_id":{"type":"string"},"sp_acs_url":{"type":"string","format":"uri"},"sp_metadata_url":{"type":"string","format":"uri","description":"SAML: this connection's service-provider metadata (entity id and ACS URL as one XML document), for an identity provider that imports SP metadata. Served for a draft too, before the identity provider's half is known."},"redirect_uri":{"type":"string","format":"uri"}}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"SsoCertificates":{"type":"object","required":["connection_id","organization_id","expires_at","days_remaining","certificates"],"description":"A SAML connection's signing certificates. The certificates themselves are never returned.","properties":{"connection_id":{"type":"string"},"organization_id":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the connection stops working if nothing is done: the latest expiry among the certificates it trusts."},"days_remaining":{"type":["integer","null"]},"certificates":{"type":"array","items":{"type":"object","required":["role","readable","fingerprint_sha256","subject","issuer","not_before","not_after","days_remaining","expired"],"properties":{"role":{"type":"string","enum":["primary","staged"],"description":"primary signs today; staged is trusted beside it until activated."},"readable":{"type":"boolean","description":"false for a certificate on file that could not be parsed — still trusted."},"fingerprint_sha256":{"type":["string","null"]},"subject":{"type":["string","null"]},"issuer":{"type":["string","null"]},"not_before":{"type":["string","null"],"format":"date-time"},"not_after":{"type":["string","null"],"format":"date-time"},"days_remaining":{"type":["integer","null"]},"expired":{"type":["boolean","null"]}}}},"checks":{"type":"array","description":"On the stage answer only: what the new certificate was tested for.","items":{"type":"object","required":["check","passed"],"properties":{"check":{"type":"string","enum":["readable","not_expired","key_strength","not_on_file","valid_now"]},"passed":{"type":"boolean"}}}}}},"LogStreamTest":{"type":"object","required":["id","delivered","failure","error","tested_at"],"properties":{"id":{"type":"string"},"delivered":{"type":"boolean","description":"Whether the destination accepted the test event (action `siem.stream.test`)."},"failure":{"type":["string","null"],"enum":["transient","authentication","configuration",null],"description":"Why not: `transient` (unreachable, busy — retrying can help) or `authentication` / `configuration` (somebody has to fix the stream). null when delivered."},"error":{"type":["string","null"],"description":"The destination's refusal, scrubbed of the stream's secret."},"tested_at":{"type":"string","format":"date-time"}}},"SsoDomain":{"type":"object","required":["id","organization_id","domain","verified","capture","verification"],"properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"domain":{"type":"string"},"verified":{"type":"boolean"},"verified_at":{"type":["string","null"],"format":"date-time"},"capture":{"type":"boolean","description":"Everyone with an address at the domain must sign in through the organization's SSO."},"verification":{"description":"The DNS TXT record that proves the domain, while it is unverified.","oneOf":[{"type":"object","required":["type","name","value"],"properties":{"type":{"type":"string","enum":["TXT"]},"name":{"type":"string"},"value":{"type":"string"}}},{"type":"null"}]}}},"SamlMetadata":{"type":"object","required":["idp_entity_id","idp_sso_url","idp_x509cert"],"description":"An identity provider's settings read from its SAML metadata. Nothing is stored.","properties":{"idp_entity_id":{"type":"string"},"idp_sso_url":{"type":"string"},"idp_x509cert":{"type":"string","description":"The IdP's public signing certificate, from its own metadata."}}},"PortalLink":{"type":"object","required":["id","organization_id","intents","url","expires_at","emailed_to","email_suppressed"],"properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"intents":{"type":"array","description":"What the link may set up.","items":{"type":"string","enum":["sso","dsync","domain_verification","log_streams","certificate_renewal","audit_logs"]}},"emailed_to":{"type":["string","null"],"description":"The address the link was mailed to, or null when it was not sent — none was asked for, or the mail was suppressed (see email_suppressed)."},"email_suppressed":{"type":"boolean","description":"True when an `email` was asked for and NOT sent because this is a sandbox\nenvironment, which sends no mail. `emailed_to` is then null, and the `url` in this\nanswer is the only way to the link — share it yourself.\n"},"url":{"type":["string","null"],"description":"The one-time setup link — the whole credential. Shown once; `null` on an\nidempotent replay of this answer.\n"},"expires_at":{"type":["string","null"],"format":"date-time"}}},"PortalLinkRecord":{"type":"object","description":"An Admin Portal link as a list shows it. Never its URL: that was shown once, when it was minted, and only its hash is kept.","required":["id","organization_id","intents","status","created_at","created_by","emailed_to","expires_at","consumed_at","completed_at","revoked_at"],"properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"intents":{"type":"array","description":"What the link may set up.","items":{"type":"string","enum":["sso","dsync","domain_verification","log_streams","certificate_renewal","audit_logs"]}},"status":{"type":"string","enum":["pending","in_use","completed","expired","revoked"],"description":"`pending`: not opened yet, and it still can be. `in_use`: opened, and the setup\nsession it started may still be running. `completed`: its setup was finished.\n`expired`: never opened in time, or its setup session ran out. `revoked`: withdrawn.\n"},"created_at":{"type":["string","null"],"format":"date-time"},"created_by":{"type":"string","description":"Who minted it: the console person's id, or the management key's."},"emailed_to":{"type":["string","null"],"description":"The address it was mailed to, or null when it was not sent."},"expires_at":{"type":["string","null"],"format":"date-time","description":"How long it could wait to be opened."},"consumed_at":{"type":["string","null"],"format":"date-time","description":"When it was opened. It is single-use."},"completed_at":{"type":["string","null"],"format":"date-time","description":"When its setup was finished."},"revoked_at":{"type":["string","null"],"format":"date-time","description":"When it was withdrawn."}}},"AuditLogEvent":{"type":"object","description":"One audit event your app sent. `hash` covers `id`, `organization_id`, `sequence`,\n`action`, `occurred_at`, `actor`, `targets`, `context` and `metadata`, chained to\nthe organization's previous event by `prev_hash` — see the Audit Logs guide for how\nto verify it yourself.\n","required":["id","organization_id","sequence","action","occurred_at","actor","targets","context","metadata","schema_version","received_at","prev_hash","hash"],"properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"sequence":{"type":"integer","description":"The event's place in its organization's chain, from 1."},"action":{"type":"string","description":"e.g. `invoice.voided`."},"occurred_at":{"type":"string","format":"date-time","description":"When it happened, as the sender said, to the millisecond."},"actor":{"type":"object","required":["id","type","name","metadata"],"properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":["string","null"]},"metadata":{"type":["object","null"]}}},"targets":{"type":"array","items":{"type":"object","required":["id","type","name","metadata"],"properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":["string","null"]},"metadata":{"type":["object","null"]}}}},"context":{"type":"object","required":["location","user_agent"],"properties":{"location":{"type":["string","null"]},"user_agent":{"type":["string","null"]}}},"metadata":{"type":["object","null"]},"schema_version":{"type":["integer","null"],"description":"The version of its action's schema it was checked against; null when the action has none."},"received_at":{"type":["string","null"],"format":"date-time","description":"When it arrived. Retention counts from here."},"prev_hash":{"type":"string","description":"The previous event's hash; 64 zeros for an organization's first."},"hash":{"type":"string"}}},"AuditLogEventBatch":{"type":"object","required":["events"],"properties":{"events":{"type":"array","description":"The recorded events, in the order they were sent.","items":{"$ref":"#/components/schemas/AuditLogEvent"}}}},"AuditLogSchema":{"type":"object","required":["id","action","version","targets","actor_metadata","metadata","created_at","updated_at"],"properties":{"id":{"type":"string"},"action":{"type":"string"},"version":{"type":"integer","description":"Starts at 1; every replacement is the next."},"targets":{"type":["array","null"],"description":"The target types this action's events may name; null allows any.","items":{"type":"object","required":["type","metadata"],"properties":{"type":{"type":"string"},"metadata":{"type":["object","null"]}}}},"actor_metadata":{"type":["object","null"],"description":"A metadata schema (a subset of JSON Schema)."},"metadata":{"type":["object","null"],"description":"A metadata schema (a subset of JSON Schema)."},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"AuditLogExport":{"type":"object","required":["id","organization_id","state","filters","row_count","url","created_at","completed_at","expires_at"],"properties":{"id":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null for an export across the whole environment."},"state":{"type":"string","enum":["pending","ready","failed","expired"]},"filters":{"type":"object","description":"The filters it was asked with."},"row_count":{"type":["integer","null"]},"url":{"type":["string","null"],"description":"Where the CSV downloads from once `ready` — signed, and valid for a few minutes;\nread the export again for a fresh one. null otherwise, and on an idempotent replay.\n"},"created_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the file is deleted."}}},"FgaSubject":{"type":"object","required":["type","id","relation"],"properties":{"type":{"type":"string","description":"The subject's type: `user`, or `group` for a userset."},"id":{"type":"string"},"relation":{"type":["string","null"],"description":"For a userset — everybody with this relation on the subject (`member` of `group:eng`). null for one subject."}}},"FgaTuple":{"type":"object","required":["resource_type","resource_id","relation","subject","tuple"],"properties":{"resource_type":{"type":"string"},"resource_id":{"type":"string"},"relation":{"type":"string"},"subject":{"$ref":"#/components/schemas/FgaSubject"},"tuple":{"type":"string","description":"The same tuple in the notation: `document:readme#viewer@group:eng#member`."}}},"FgaSchema":{"type":"object","required":["defined","schema","version","types","updated_at","consistency_token"],"properties":{"defined":{"type":"boolean","description":"false until a schema is first saved."},"schema":{"type":["string","null"],"description":"The source as it was written, comments and all."},"version":{"type":"integer","description":"How many times the schema has been replaced."},"types":{"type":"array","description":"The parsed types, each with its relations and how each is decided.","items":{"$ref":"#/components/schemas/FgaType"}},"updated_at":{"type":["string","null"],"format":"date-time"},"consistency_token":{"type":"string","description":"The revision the model is at."}}},"FgaType":{"type":"object","required":["name","relations"],"properties":{"name":{"type":"string"},"relations":{"type":"array","items":{"type":"object","required":["name","rewrite","directly_related"],"properties":{"name":{"type":"string"},"rewrite":{"type":"object","description":"How the relation is decided, as a tree of one-key objects: `direct` (a list of\n`{type, relation?}`), `computed` (a relation name), `from` (`{tupleset, relation}`),\n`union` and `intersection` (lists of rewrites), `exclusion` (`{base, subtract}`).\n"},"directly_related":{"type":"array","description":"The subjects a tuple may name on this relation; empty for a relation that is only computed.","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"relation":{"type":"string"}}}}}}}}},"FgaSchemaValidation":{"type":"object","required":["valid","errors","types","canonical"],"properties":{"valid":{"type":"boolean"},"errors":{"type":"array","items":{"type":"object","required":["line","message"],"properties":{"line":{"type":"integer","description":"0 when the problem is about the whole schema."},"message":{"type":"string"}}}},"types":{"type":"array","items":{"$ref":"#/components/schemas/FgaType"}},"canonical":{"type":["string","null"],"description":"The schema as the platform prints it, when valid."}}},"FgaTupleWrite":{"type":"object","required":["written","deleted","consistency_token"],"properties":{"written":{"type":"integer","description":"Tuples that were new. Re-writing an existing one is not counted."},"deleted":{"type":"integer","description":"Tuples that were there to delete."},"consistency_token":{"type":"string","description":"Pass to a check that must see this write."}}},"FgaCheck":{"type":"object","required":["allowed","resource_type","resource_id","relation","subject","consistency_token"],"properties":{"allowed":{"type":"boolean"},"resource_type":{"type":"string"},"resource_id":{"type":"string"},"relation":{"type":"string"},"subject":{"$ref":"#/components/schemas/FgaSubject"},"consistency_token":{"type":"string","description":"The revision the answer was decided at."}}},"FgaCheckBatch":{"type":"object","required":["results","consistency_token"],"properties":{"results":{"type":"array","description":"One answer per check, in the order asked.","items":{"$ref":"#/components/schemas/FgaCheck"}},"consistency_token":{"type":["string","null"]}}},"FgaObject":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string"},"id":{"type":"string"}}},"AuditLogSettings":{"type":"object","required":["retention_days","strict_schemas"],"properties":{"retention_days":{"type":"integer","description":"Events are kept this many days after they arrive."},"strict_schemas":{"type":"boolean","description":"Whether an action with no schema is refused."}}},"RadarSettings":{"type":"object","required":["mode","mode_inherited","deployment_mode","ip_intelligence","builtin_rules"],"properties":{"mode":{"type":"string","enum":["monitor","enforce"],"description":"monitor records every verdict and acts on none; enforce blocks and challenges."},"mode_inherited":{"type":"boolean","description":"True while the environment follows the deployment's default (RISK_MODE) rather than a mode it chose."},"deployment_mode":{"type":"string","enum":["monitor","enforce"]},"ip_intelligence":{"type":"string","enum":["none","maxmind","ipinfo"],"description":"The configured IP intelligence source. With none, country, network and travel facts are unknown and the rules on them never fire."},"builtin_rules":{"type":"array","items":{"type":"object","required":["key","name","description","applies_to","enabled","action","threshold","threshold_unit","threshold_min","threshold_max"],"properties":{"key":{"type":"string","enum":["credential_stuffing","bot_velocity","account_attack","impossible_travel","new_device","anonymous_network","hosting_network","disposable_email","risk_score_reject","risk_score_elevated"]},"name":{"type":"string"},"description":{"type":"string"},"applies_to":{"type":"string","enum":["all","sign_in","sign_up"]},"enabled":{"type":"boolean"},"action":{"type":"string","enum":["allow","challenge","block"]},"threshold":{"type":["integer","null"],"description":"null for a rule that counts nothing."},"threshold_unit":{"type":["string","null"]},"threshold_min":{"type":["integer","null"]},"threshold_max":{"type":["integer","null"]}}}}}},"RadarRule":{"type":"object","required":["id","name","description","position","enabled","applies_to","action","conditions","summary","created_at","updated_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"position":{"type":"integer","description":"1 is evaluated first; the first rule whose conditions all hold decides."},"enabled":{"type":"boolean"},"applies_to":{"type":"string","enum":["all","sign_in","sign_up"]},"action":{"type":"string","enum":["allow","challenge","block"]},"conditions":{"type":"array","items":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string"},"operator":{"type":"string","enum":["eq","neq","in","not_in","gt","gte","lt","lte","contains","not_contains","starts_with","ends_with","in_cidr","not_in_cidr"]},"value":{"description":"Normalised: a string, a number, true/false, or a list for the list operators.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}}]}}}},"summary":{"type":"string","description":"The conditions as a person reads them."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"RadarListEntry":{"type":"object","required":["id","list","kind","value","note","expires_at","active","created_at"],"properties":{"id":{"type":"string"},"list":{"type":"string","enum":["allow","deny"]},"kind":{"type":"string","enum":["ip","email","email_domain","device"]},"value":{"type":"string","description":"Normalised: an IP or CIDR range, a lower-case address or domain, or a device id."},"note":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"RadarDecision":{"type":"object","required":["id","assessed_at","flow","method","verdict","enforced","mode","rule","rule_name","triggered","reasons","risk_score","risk_outcome","country","asn","email_domain","device","facts"],"properties":{"id":{"type":"string"},"assessed_at":{"type":"string","format":"date-time"},"flow":{"type":"string","enum":["sign_in","sign_up"]},"method":{"type":["string","null"],"enum":["password","magic_link","passkey","sign_up",null]},"verdict":{"type":"string","enum":["allow","challenge","block"]},"enforced":{"type":"boolean","description":"Whether the verdict was acted on; false under monitor."},"mode":{"type":"string","enum":["monitor","enforce"]},"rule":{"type":["string","null"],"description":"What decided it: deny_list:, allow_list:, rule:, builtin:; null when nothing matched."},"rule_name":{"type":["string","null"]},"triggered":{"type":"array","description":"Every rule that fired, the deciding one included.","items":{"type":"object","required":["rule","name"],"properties":{"rule":{"type":"string"},"name":{"type":"string"}}}},"reasons":{"type":"array","items":{"type":"string"}},"risk_score":{"type":"number"},"risk_outcome":{"type":"string","enum":["allow","flag","challenge","step_up","reject"]},"country":{"type":["string","null"]},"asn":{"type":["integer","null"]},"email_domain":{"type":["string","null"]},"device":{"type":["string","null"],"description":"The device id (a pseudonym of the device cookie), for a returning device."},"facts":{"type":"object","description":"The facts the rules were evaluated on — never the IP, the address or the user agent."}}},"AuditLogVerification":{"type":"object","required":["organization_id","valid","complete","verified_count","first_sequence","last_sequence","head_sequence","broken_at_sequence","reason"],"properties":{"organization_id":{"type":"string"},"valid":{"type":"boolean","description":"Every event checked is unchanged and in place."},"complete":{"type":"boolean","description":"The check reached the chain's head. When false, continue from last_sequence + 1."},"verified_count":{"type":"integer"},"first_sequence":{"type":["integer","null"]},"last_sequence":{"type":["integer","null"]},"head_sequence":{"type":"integer"},"broken_at_sequence":{"type":["integer","null"]},"reason":{"type":["string","null"],"enum":["missing","link","hash","truncated",null]}}},"Directory":{"type":"object","required":["id","organization_id","name","provider","pull","active","status"],"description":"A directory syncing an organization's people in. Its token and credentials are never returned after they are minted.","properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string","enum":["scim","google_workspace","microsoft_entra","workday","bamboohr","rippling","hibob","personio"]},"pull":{"type":"boolean","description":"true when this platform fetches from the provider; false for a SCIM endpoint the provider posts to."},"hris":{"type":"boolean","description":"true for an HR system (Workday, BambooHR, Rippling, HiBob, Personio): employment dates decide access and departments become groups."},"active":{"type":"boolean"},"status":{"type":"string","enum":["active","paused"]},"scim_base_url":{"type":["string","null"],"description":"Where the identity provider sends SCIM requests. null for a pull directory."},"last_synced_at":{"type":["string","null"],"format":"date-time"},"last_sync_error":{"type":["string","null"],"description":"Why the last pull failed, or for a partial one how many records could not be synced and the first reason. Never names a person."},"last_sync_started_at":{"type":["string","null"],"format":"date-time","description":"When the last pull started. null for a SCIM directory."},"last_sync_status":{"type":["string","null"],"enum":["running","succeeded","partial","failed",null],"description":"How the last pull went. partial: the provider answered but some records could not be reconciled, or a mass deprovisioning was refused."},"last_sync_stats":{"type":["object","null"],"description":"The last pull's counts, and up to 50 records it could not reconcile — by the provider's own id, never by name or email.","properties":{"mode":{"type":"string","enum":["full","incremental"]},"provisioned":{"type":"integer"},"deprovisioned":{"type":"integer"},"groups":{"type":"integer"},"skipped":{"type":"integer","description":"Leavers and people who have not started, who never had an account."},"failed":{"type":"integer"},"failures":{"type":"array","items":{"type":"object","properties":{"external_id":{"type":["string","null"]},"reason":{"type":"string"}}}}}},"sync_interval_minutes":{"type":["integer","null"],"description":"Minutes between scheduled pulls. null for a SCIM directory."},"next_sync_at":{"type":["string","null"],"format":"date-time"},"custom_attributes":{"type":["array","null"],"items":{"type":"string"},"description":"HR systems only: the HR system's own field names copied onto each person."},"created_at":{"type":["string","null"],"format":"date-time"},"bearer_token":{"type":["string","null"],"description":"The SCIM bearer token, on the create and rotate answers only — shown once, never\nretrievable again. `null` on an idempotent replay of that answer.\n"}}},"DirectoryGroup":{"type":"object","required":["id","directory_id","name","role_ids"],"properties":{"id":{"type":"string"},"directory_id":{"type":"string"},"name":{"type":"string"},"external_id":{"type":["string","null"]},"role_ids":{"type":"array","items":{"type":"string"},"description":"The roles everyone in the group holds."}}},"ProvisioningTarget":{"type":"object","required":["id","organization_id","name","base_url","auth_scheme","active"],"description":"A downstream app people are pushed to over SCIM. Its credential is write-only.","properties":{"id":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null when it receives every organization's people."},"name":{"type":"string"},"base_url":{"type":"string"},"auth_scheme":{"type":"string","enum":["bearer","oauth2_client_credentials"]},"token_url":{"type":["string","null"]},"client_id":{"type":["string","null"]},"active":{"type":"boolean","description":"false while paused."},"consecutive_failures":{"type":"integer"},"last_success_at":{"type":["string","null"],"format":"date-time"},"last_error":{"type":["string","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"SodPolicy":{"type":"object","required":["id","organization_id","name","role_ids","active"],"description":"A role-conflict (segregation of duties) rule: roles no one person may hold together.","properties":{"id":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null when it binds every organization."},"name":{"type":"string"},"description":{"type":["string","null"]},"role_ids":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"}}},"FeatureFlag":{"type":"object","required":["id","key","enabled","default_value","users","organizations"],"description":"A switch apps ask about per user and organization. First match wins: switched off, then a user rule, then an organization rule, then the rollout, then the default.","properties":{"id":{"type":"string"},"key":{"type":"string","description":"What code asks for and the `feature_flags` claim carries. Fixed once created."},"description":{"type":["string","null"]},"enabled":{"type":"boolean","description":"The kill switch: false is off for everyone."},"default_value":{"type":"boolean","description":"The answer when no rule matches."},"rollout_percentage":{"type":["integer","null"],"minimum":0,"maximum":100,"description":"On for this share of everyone else, by a stable hash of the user id (the organization id without one)."},"users":{"type":"array","description":"Rules for named users; they outrank every other rule.","items":{"$ref":"#/components/schemas/FeatureFlagRule"}},"organizations":{"type":"array","description":"Rules for named organizations; they outrank the rollout and the default.","items":{"$ref":"#/components/schemas/FeatureFlagRule"}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"FeatureFlagRule":{"type":"object","required":["id","enabled"],"properties":{"id":{"type":"string","description":"The user's or organization's id."},"enabled":{"type":"boolean","description":"On or off for them."}}},"FeatureFlagEvaluation":{"type":"object","required":["user_id","organization_id","feature_flags","evaluations"],"description":"Every flag's answer for the user and organization asked about.","properties":{"user_id":{"type":["string","null"]},"organization_id":{"type":["string","null"]},"feature_flags":{"type":"array","description":"The keys of the flags that are on, sorted — exactly what the token's `feature_flags` claim would carry.","items":{"type":"string"}},"evaluations":{"type":"array","items":{"type":"object","required":["key","enabled","reason"],"properties":{"key":{"type":"string"},"enabled":{"type":"boolean"},"reason":{"type":"string","enum":["disabled","user_target","organization_target","rollout","default"],"description":"The rule that decided."}}}}}},"AccessReview":{"type":"object","required":["id","organization_id","staff","name","status","open","pending_policy","item_count"],"properties":{"id":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null for a staff review of environment-wide grants."},"staff":{"type":"boolean"},"name":{"type":"string"},"status":{"type":"string","enum":["open","closed"]},"open":{"type":"boolean"},"pending_policy":{"type":"string","enum":["revoke","certify"],"description":"What closing does to an item nobody decided."},"item_count":{"type":"integer"},"due_at":{"type":["string","null"],"format":"date-time"},"closed_at":{"type":["string","null"],"format":"date-time"},"created_by":{"type":["string","null"],"description":"The person or key that opened it."},"created_at":{"type":["string","null"],"format":"date-time"}}},"AccessReviewItem":{"type":"object","required":["id","review_id","subject_id","access_type","access_ref","decision","applied"],"properties":{"id":{"type":"string"},"review_id":{"type":"string"},"subject_id":{"type":"string"},"access_type":{"type":"string","enum":["role","membership","environment_role"]},"access_ref":{"type":"string","description":"The role id, or the organization id of a membership."},"organization_id":{"type":["string","null"]},"decision":{"type":"string","enum":["pending","certified","revoked"]},"decided_by":{"type":["string","null"]},"decided_at":{"type":["string","null"],"format":"date-time"},"note":{"type":["string","null"]},"applied":{"type":"boolean","description":"Whether a revoke was carried out when the review closed."},"application_note":{"type":["string","null"],"description":"Why a revoke could not be applied."}}},"TokenVaultSecret":{"type":"object","required":["id","organization_id","name","provider","status","revoked"],"description":"A downstream credential in the token vault. Its value is write-only.","properties":{"id":{"type":"string"},"organization_id":{"type":["string","null"],"description":"null for the environment's own secrets."},"name":{"type":"string"},"provider":{"type":"string"},"status":{"type":"string","enum":["active","expired","revoked"]},"revoked":{"type":"boolean"},"expires_at":{"type":["string","null"],"format":"date-time"},"rotated_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"grants":{"type":"array","items":{"type":"string"},"description":"The OAuth client ids that may lease it. Not on lists."}}},"Pipe":{"type":"object","required":["id","provider","name","client_id","scopes","enabled","redirect_uri","grants","connections"],"description":"A pipe: this environment's OAuth app at a third-party provider, through which people connect their own accounts. The client secret is write-only.","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["github","google","microsoft","slack","salesforce","hubspot","linear","notion"]},"name":{"type":"string"},"client_id":{"type":"string","description":"Your app's OAuth client id at the provider."},"scopes":{"type":"array","items":{"type":"string"},"description":"What people are asked for when they connect."},"parameters":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-installation values: Microsoft's `tenant`, Salesforce's `domain`."},"enabled":{"type":"boolean"},"redirect_uri":{"type":"string","format":"uri","description":"The callback URL to register at the provider."},"grants":{"type":"array","items":{"type":"string"},"description":"The OAuth client ids of the apps that may lease its tokens."},"connections":{"type":"integer","description":"How many people have connected an account through it."},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"PipeConnection":{"type":"object","required":["id","pipe_id","provider","user_id","status","scopes"],"description":"One person's connected account at a pipe's provider. Never a token.","properties":{"id":{"type":"string"},"pipe_id":{"type":"string"},"provider":{"type":"string"},"user_id":{"type":"string"},"status":{"type":"string","enum":["active","needs_reauth"]},"account":{"type":["string","null"],"description":"The account's name at the provider, when it says (a GitHub login, an email, an organization)."},"scopes":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the current access token expires. Null when it does not."},"connected_at":{"type":["string","null"],"format":"date-time"},"last_refreshed_at":{"type":["string","null"],"format":"date-time"},"refresh_failures":{"type":"integer","description":"Consecutive transient refresh failures."},"last_error":{"type":["string","null"]},"reauth_reason":{"type":["string","null"],"description":"Why it needs reconnecting: the provider's error code, or `no_refresh_token`."}}},"PipeConnectRequired":{"type":"object","required":["error","message","connect_url"],"properties":{"error":{"type":"string","enum":["not_connected","reauthorization_required"]},"message":{"type":"string"},"connect_url":{"type":"string","format":"uri","description":"Where to send the person to connect. Add `?client_id=…&return_to=…` to bring them back to your app."}}},"AgentRequest":{"type":"object","description":"A pending request from an agent to act as one of this environment's people (OIDC CIBA).","required":["id","client_id","app","subject","scopes","expires_at"],"properties":{"id":{"type":"string"},"client_id":{"type":"string"},"app":{"type":"string","description":"The app's name, or its client id when it has none."},"subject":{"type":"object","description":"Whom the agent asks to act as.","required":["id","email"],"properties":{"id":{"type":"string"},"email":{"type":["string","null"],"description":"Null when that person no longer exists — the request can still be denied."}}},"binding_message":{"type":["string","null"],"description":"The message the person sees on their device, to recognise the request."},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"}}},"PageMeta":{"type":"object","properties":{"limit":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}},"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine code"},"message":{"type":"string","description":"Human-readable explanation"},"request_id":{"type":"string","description":"The id this request was served under, also sent as the X-Request-Id header. Quote it when reporting a problem."},"errors":{"type":"object","description":"Present on `validation_failed` only: the offending request fields, each\nmapped to its messages.\n","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"BearerChallenge":{"type":"object","required":["error","error_description"],"description":"RFC 6750 §3 error shape, used by the OAuth-token-authenticated Token Vault\nendpoints. NOT the `{error, message}` envelope — restating the envelope here\nwould be a protocol conformance bug.\n","properties":{"error":{"type":"string","enum":["invalid_request","invalid_token","insufficient_scope"]},"error_description":{"type":"string"}}},"ServiceConnection":{"type":"object","required":["id","organization_id","service","consumer_client_id","audience","scopes","revoked_at"],"properties":{"id":{"type":"string"},"organization_id":{"type":"string"},"service":{"type":"string"},"consumer_client_id":{"type":"string"},"audience":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"revoked_at":{"type":["string","null"],"format":"date-time"}}},"AppsUserPropertySnapshot":{"type":"object","required":["user_id","namespace","data","version"],"properties":{"user_id":{"type":"string"},"namespace":{"type":"string"},"data":{"type":"object","additionalProperties":true},"version":{"type":"integer","minimum":0}}},"Manifest":{"type":"object","required":["version","permissions","roles"],"properties":{"version":{"type":"string"},"permissions":{"type":"array","items":{"type":"object","required":["key"],"properties":{"key":{"type":"string"},"description":{"type":["string","null"]},"tenant_assignable":{"type":"boolean"}}}},"roles":{"type":"array","items":{"type":"object","required":["key","name","permissions"],"properties":{"key":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"permissions":{"type":"array","items":{"type":"string"}},"tenant_assignable":{"type":"boolean"}}}}}},"ManifestReceipt":{"type":"object","required":["client_id","version","checksum","unchanged","roles_declared","permissions_declared","orphaned_roles","orphaned_permissions"],"properties":{"client_id":{"type":"string"},"version":{"type":"string"},"checksum":{"type":"string","pattern":"^[a-f0-9]{64}$"},"unchanged":{"type":"boolean"},"roles_declared":{"type":"integer","minimum":0},"permissions_declared":{"type":"integer","minimum":0},"orphaned_roles":{"type":"array","items":{"type":"string"}},"orphaned_permissions":{"type":"array","items":{"type":"string"}}}},"PropertyPatch":{"type":"object","required":["version"],"properties":{"version":{"type":"integer","minimum":0},"set":{"type":"object","additionalProperties":true},"remove":{"type":"array","maxItems":100,"uniqueItems":true,"items":{"type":"string","maxLength":128}},"object":{"type":"string"}},"additionalProperties":false},"ServiceToken":{"type":"object","required":["access_token","token_type","expires_in","scope","audience"],"properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer","minimum":0},"scope":{"type":"string"},"audience":{"type":"string"}}},"ServiceInspection":{"oneOf":[{"type":"object","required":["active"],"properties":{"active":{"const":false,"type":"boolean"}}},{"type":"object","required":["active","id","organization_id","service","consumer_client_id","audience","scopes","revoked_at","service_client_id"],"properties":{"active":{"const":true,"type":"boolean"},"id":{"type":"string"},"organization_id":{"type":"string"},"service":{"type":"string"},"consumer_client_id":{"type":"string"},"audience":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"revoked_at":{"type":["string","null"],"format":"date-time"},"service_client_id":{"type":"string"}}}]},"Profile":{"type":"object","required":["id","name","email"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}}},"Passkey":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string","description":"What you call it — one to 64 characters."},"created_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When it last signed you in; null if it never has since this was recorded."}}},"SessionsRevoked":{"type":"object","required":["revoked"],"properties":{"revoked":{"type":"integer","description":"How many sessions were signed out."}}},"PersonalApiKey":{"type":"object","required":["id","organization_id","client_id","permissions"],"properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"organization_id":{"type":"string"},"client_id":{"type":"string"},"prefix":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"token":{"type":["string","null"],"description":"The key's value — shown once, on creation; null on an idempotent replay."}}},"AccountError":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine code"},"message":{"type":"string","description":"Human-readable explanation"},"request_id":{"type":"string","description":"The id this request was served under, also sent as the X-Request-Id header. Quote it when reporting a problem."},"errors":{"type":"object","description":"Present on `validation_failed` only — the offending fields, each mapped to its messages.","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"VerificationResend":{"type":"object","required":["outcome","message"],"properties":{"outcome":{"type":"string","enum":["sent","already_provisioned"]},"message":{"type":"string"}}},"OrganizationOrganization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","suspended"]}}},"Project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["active","suspended"]},"environment_limit":{"type":"integer","description":"Local per-project ceiling; creating environments also requires sufficient current Billing entitlement."},"environments_used":{"type":"integer","description":"Number of environments visible to the caller."}}},"Environment":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"type":"string","enum":["production","sandbox"]},"status":{"type":"string"},"project_id":{"type":"string","description":"The project (billing anchor) this environment belongs to."},"domain":{"type":["string","null"]},"issuer":{"type":"string","format":"uri","description":"The environment's own host — where its OIDC/environment API lives."}}},"OrganizationMember":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"],"format":"email"},"name":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","developer","member","viewer"],"description":"Shared membership tier; only current owner implies app authority."},"roles":{"type":"array","items":{"type":"string","enum":["admin","developer","billing","viewer"]}},"roles_version":{"type":"string"},"status":{"type":"string","enum":["active","invited","suspended"]},"all_environments":{"type":"boolean"},"environment_ids":{"type":"array","items":{"type":"string"}},"environment_access_version":{"type":"string"}}},"CreatedEnvironment":{"description":"An environment, and — when the request asked for one — its first management key.","allOf":[{"$ref":"#/components/schemas/Environment"},{"type":"object","properties":{"initial_key":{"$ref":"#/components/schemas/EnvironmentKey"}}}]},"EnvironmentKey":{"type":"object","description":"A management key (`cbid_env_…`) of one of the organization's environments. `token` is present only in the answer that minted it, and `null` on an idempotent replay.","required":["id","environment_id","name","scopes"],"properties":{"id":{"type":"string"},"environment_id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"},"token":{"type":["string","null"],"description":"The key's value. Shown once."}}},"WorkspaceKey":{"type":"object","description":"An organization key (`cbid_ws_…`). `token` is present only in the answer that minted it, and `null` on an idempotent replay.","required":["id","name","role"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","member","viewer"]},"scopes":{"type":["array","null"],"items":{"type":"string","enum":["id:organization:read","id:projects:write","id:environments:write","id:members:read","id:members:write","id:environment-keys:write","id:organization-keys:write","id:organization:write","id:billing:write"]},"description":"Null when the role alone bounds the key."},"parent_key_id":{"type":["string","null"],"description":"The key that minted it, if a key did. Revoking the parent revokes it."},"created_by_type":{"type":["string","null"],"description":"`organization_member` or `organization_key` (`workspace_key` before v3); null for a key minted before this was recorded."},"expires_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"token":{"type":["string","null"],"description":"The key's value. Shown once."}}},"TeamInvitation":{"type":"object","required":["id","email","roles","expires_at"],"properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["admin","developer","member","viewer"]},"roles":{"type":"array","items":{"type":"string","enum":["admin","developer","billing","viewer"]}},"app_role_label":{"type":["string","null"]},"invited_by":{"type":["string","null"],"description":"The person, or the API key, that sent it — by name."},"invited_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":"string","format":"date-time"}}},"TeamInvitationReceipt":{"type":"object","required":["id","email","roles","status"],"properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"roles":{"type":"array","items":{"type":"string","enum":["admin","developer","billing","viewer"]}},"status":{"type":"string","enum":["invited"]}}},"OrganizationCustomDomain":{"type":"object","required":["domain","verified_at","pending"],"properties":{"domain":{"type":["string","null"],"description":"The verified domain serving the environment."},"verified_at":{"type":["string","null"],"format":"date-time"},"pending":{"description":"A domain waiting for its DNS proof, and the TXT record to publish.","oneOf":[{"type":"object","required":["domain","record_name","record_value"],"properties":{"domain":{"type":"string"},"record_name":{"type":"string"},"record_value":{"type":"string"}}},{"type":"null"}]}}},"OrganizationPageMeta":{"type":"object","description":"Paging for a list response. `has_more` used to be returned with nothing to act on it — no page parameter and no cursor — so a caller told there was more had no way to ask for it. `next_page` is present exactly when `has_more` is true, so a client can loop without computing anything.","properties":{"limit":{"type":"integer"},"page":{"type":"integer","minimum":1},"total":{"type":"integer","description":"Present on lists that can count cheaply."},"has_more":{"type":"boolean"},"next_page":{"type":["integer","null"],"description":"Pass as `page` on the next request; absent on the last page."}}},"ProvisionedWorkspace":{"type":"object","required":["id","name","owner","project_id","environment_id","owner_invited"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"owner":{"type":"object","required":["id","email"],"properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"}}},"project_id":{"type":"string","description":"The organization's first project."},"environment_id":{"type":"string","description":"That project's first environment."},"owner_invited":{"type":"boolean","description":"Whether the owner was emailed a link to set their password."}}},"PlatformOrganization":{"type":"object","required":["id","name","slug","type","status"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"type":"string","enum":["customer","reseller"]},"status":{"type":"string","enum":["active","suspended","deleted"]},"parent_id":{"type":["string","null"]},"environment_id":{"type":["string","null"],"description":"The environment it lives in."},"created_at":{"type":["string","null"],"format":"date-time"}}},"PlatformEnvironment":{"type":"object","required":["id","name","slug","status"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"domain":{"type":["string","null"],"description":"The verified domain it serves on — null until one is verified by DNS."},"status":{"type":"string"},"project_id":{"type":["string","null"],"description":"The project that owns it; null for one no customer owns yet."},"created_at":{"type":["string","null"],"format":"date-time"}}},"ProvisionedEnvironment":{"type":"object","required":["environment_id","organization","admin"],"properties":{"environment_id":{"type":"string"},"organization":{"$ref":"#/components/schemas/PlatformOrganization"},"admin":{"type":"object","required":["id","email"],"properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"}}}}},"PlatformOperator":{"type":"object","required":["id","email","status"],"properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"name":{"type":["string","null"]},"status":{"type":"string","enum":["active","suspended"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"AdminError":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Stable machine code"},"message":{"type":"string","description":"Human-readable explanation"},"request_id":{"type":"string","description":"The id this request was served under, also sent as the X-Request-Id header. Quote it when reporting a problem."},"errors":{"type":"object","description":"Present on `validation_failed` only — the offending fields, each mapped to its messages.","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"Problem":{"type":"object","description":"An RFC 9457 problem. `error` is the stable machine code; `type` resolves to its entry in the reference.","required":["type","title","status","detail","error"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"error":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"List":{"type":"object","description":"A page of a list. Pass `next_cursor` as `after` for the next one.","required":["object","data","has_more","next_cursor"],"properties":{"object":{"const":"list"},"data":{"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}}}},"parameters":{"CboxEnvironment":{"name":"Cbox-Environment","in":"header","required":false,"description":"Only with a `OrganizationAccessToken`, on the platform root's host: the environment of\nyour organization to act in, by id or slug. Required there; ignored with a key, which\nis bound to its own environment's host.\n","schema":{"type":"string"}},"CboxApproval":{"name":"Cbox-Approval","in":"header","required":false,"description":"The id of an approval this key asked for (from a `202 approval_required`), once the person approved it. Spent by this request, once.","schema":{"type":"string"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (a UUID). A retry with the same key and request gets the first answer back.","schema":{"type":"string","maxLength":255}},"ScopeKey":{"name":"key","in":"path","required":true,"description":"The scope key, for example `tax:assess`.","schema":{"type":"string","maxLength":128}},"Id":{"name":"id","in":"path","required":true,"schema":{"type":"string"}},"OrganizationId":{"name":"organization_id","in":"path","required":true,"description":"The organization's id.","schema":{"type":"string"}},"UserId":{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}},"InvitationId":{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string"}},"RoleId":{"name":"role_id","in":"path","required":true,"description":"The role's id — or its manifest `key`, together with `?client_id=` naming the app that declared it.","schema":{"type":"string"}},"RoleClientId":{"name":"client_id","in":"query","required":false,"description":"The app whose manifest `key` `{role_id}` is. Not needed when `{role_id}` is an id.","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},"After":{"name":"after","in":"query","required":false,"description":"Opaque cursor — the `meta.next_cursor` from the previous page.","schema":{"type":"string"}},"AccountCboxApproval":{"name":"Cbox-Approval","in":"header","required":false,"description":"The id of an approval this request was held for, once you approved it. Spent by this request, once.","schema":{"type":"string"}},"AdminCboxApproval":{"name":"Cbox-Approval","in":"header","required":false,"description":"The id of an approval this request was held for, once the person approved it. Spent by this request, once.","schema":{"type":"string"}}},"responses":{"ApprovalRequired":{"description":"Held for a person's approval: this key's policy requires its owner to approve this\naction on their device first. Poll `approval.poll_url`, then repeat the same request\n(same body, same `Idempotency-Key`) with `Cbox-Approval: `.\n","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","status","binding_code","expires_at","poll_url"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"binding_code":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"poll_url":{"type":"string","format":"uri"}}},{"type":"object","required":["object"],"properties":{"object":{"const":"approval"},"detail":{"type":["string","null"]}}}]}}}},"Unauthorized":{"description":"Missing or invalid environment API key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Forbidden":{"description":"The key is missing the scope this endpoint requires.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"NotFound":{"description":"No such resource in this environment.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"EnvironmentRequired":{"description":"A `OrganizationAccessToken` on the platform root's host named no environment\n(`error: environment_required`): send `Cbox-Environment`.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"UnprocessableEntity":{"description":"Validation failed (`error: validation_failed`, with a field-keyed `errors` map),\nor a uniqueness conflict (e.g. slug/email taken).\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"Conflict":{"description":"The request conflicts with the resource's state; `error` names which rule\n(`last_owner`, `already_member`, `not_pending`, `role_conflict`, …).\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"MailFailed":{"description":"The mail server refused the invitation mail (`error: mail_failed`). Retry.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"TooManyRequests":{"description":"The key's rate limit for this plane is exhausted. The bucket is keyed on the API\nKEY, so this reflects only your own traffic.\n","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"BearerUnauthorized":{"description":"Missing, expired, or wrongly-audienced access token (RFC 6750 challenge).","headers":{"WWW-Authenticate":{"description":"Bearer error=\"invalid_token\", error_description=\"…\"","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"ApprovalNotActionable":{"description":"The request is no longer pending. Deliberately uniform — unknown, expired, already\nanswered and belonging-to-another-subject are ONE response with a constant\nmessage, so someone holding a stolen handset cannot learn whether a given request\nid exists or whose it is.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"BearerForbidden":{"description":"The access token does not carry the scope this endpoint requires.","headers":{"WWW-Authenticate":{"description":"Bearer error=\"insufficient_scope\", scope=\"…\"","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AccountApprovalRequired":{"description":"Held for your approval on your device. Poll `approval.poll_url`, then repeat the same request with `Cbox-Approval`.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","status","binding_code","expires_at","poll_url"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"binding_code":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"poll_url":{"type":"string","format":"uri"}}},{"type":"object","required":["object"],"properties":{"object":{"const":"approval"},"detail":{"type":["string","null"]}}}]}}}},"AccountUnauthorized":{"description":"No valid token of yours. Management keys always get this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AccountForbidden":{"description":"The token lacks the required scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AccountNotFound":{"description":"No such session, passkey, key, device or linked account of yours.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AccountConflict":{"description":"A request with this `Idempotency-Key` is still being processed (`idempotency_in_progress`). Retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AccountUnprocessableEntity":{"description":"Validation failed (`error: validation_failed`, with a field-keyed `errors` map), or the\nrequest was refused — disconnecting your last way to sign in, a key permission you do\nnot hold.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AccountTooManyRequests":{"description":"The token's rate limit is exhausted.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AdmissionUnavailable":{"description":"Billing admission is unavailable. No project or environment is created; retry later.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"OrganizationApprovalRequired":{"description":"Held for a person's approval: this key's policy requires the person who minted it to\napprove this action on their device first. Poll `approval.poll_url`, then repeat the\nsame request (same body, same `Idempotency-Key`) with `Cbox-Approval: `.\n","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","status","binding_code","expires_at","poll_url"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"binding_code":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"poll_url":{"type":"string","format":"uri"}}},{"type":"object","required":["object"],"properties":{"object":{"const":"approval"},"detail":{"type":["string","null"]}}}]}}}},"OrganizationUnauthorized":{"description":"Missing or invalid organization key (or its organization is suspended)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"OrganizationForbidden":{"description":"The current app permissions or machine key role lack the required capability, or the credential lacks the required scope","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"OrganizationMailFailed":{"description":"The mail server refused the invitation (`mail_failed`). A new invitation is withdrawn, so trying again works; a re-sent one is kept.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"OrganizationNotFound":{"description":"No such resource in this organization","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"OrganizationConflict":{"description":"A request with this `Idempotency-Key` is still being processed (`idempotency_in_progress`).\nRetry shortly.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"OrganizationUnprocessableEntity":{"description":"Validation failed (`error: validation_failed`, with a field-keyed `errors` map),\nor the request was well-formed but refused for a domain reason — a taken email,\na reached plan limit.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AdminApprovalRequired":{"description":"Held for a person's approval. Poll `approval.poll_url`, then repeat the same request with `Cbox-Approval`.","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","status","binding_code","expires_at","poll_url"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"binding_code":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"poll_url":{"type":"string","format":"uri"}}},{"type":"object","required":["object"],"properties":{"object":{"const":"approval"},"detail":{"type":["string","null"]}}}]}}}},"AdminUnauthorized":{"description":"No valid operator token. Management keys always get this.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AdminForbidden":{"description":"The token's person is not an active platform operator, or the token lacks the required scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AdminNotFound":{"description":"No such organization, environment, organization or operator on this deployment.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AdminConflict":{"description":"A request with this `Idempotency-Key` is still being processed (`idempotency_in_progress`). Retry shortly.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AdminUnprocessableEntity":{"description":"Validation failed (`error: validation_failed`, with a field-keyed `errors` map), or the\nrequest was refused for a domain reason — an address already an operator, a password\nthe environment's policy rejects, the last active operator.\n","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"AdminTooManyRequests":{"description":"The token's rate limit for this API is exhausted.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"securitySchemes":{"ServiceConnectionEvents":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Organization service-account lease with signals:events:read and the exact realm issuer audience"},"ServiceConnectionAdmin":{"type":"http","scheme":"bearer","description":"Organization administrator token with service_connections.manage"},"ServiceConnectionProvider":{"type":"http","scheme":"bearer","description":"Provider machine token with service_connections.inspect"},"ServiceConnectionConsumer":{"type":"http","scheme":"bearer","description":"Consumer machine token with service_connections.lease"},"UserPropertiesAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Issuer-audience OAuth access token with user_properties:read or user_properties:write and an explicit namespace grant. DPoP-bound tokens require the DPoP authorization scheme and proof header. An environment management API key is not accepted."},"EnvironmentApiKey":{"type":"http","scheme":"bearer","bearerFormat":"cbid_env_","description":"An environment API key, `cbid_env_…`. Created by the account that owns the environment,\nin the console under Identity platform › Environment keys — not in the environment's own\nconsole. Bound to that environment's host, and carries an explicit list of scopes; it may\nalso carry an expiry.\n"},"AppAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"An app's OWN OAuth access token from the client-credentials grant, issued by this\nenvironment and standing for no person. Accepted only by the operations whose scope an\nadministrator may grant an app for this (`app_catalog:resolve`), and only when the token\ncarries it. DPoP-bound tokens require the DPoP authorization scheme and proof header.\n"},"ManagementAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A PERSON's OAuth access token, issued by this environment's issuer and audienced to\nits management plane (`resource=https:///mcp` — the same token the\nMCP server takes). `cbox login` and MCP clients obtain one by signing the person in.\n\nIt may run an operation only when it carries the operation's scope AND the person\ncould run it on their own console here: an organization administrator, confined to\nthe organization the token is bound to. Operations that belong to the environment\nconsole do not list it. Every critical operation answers `202 approval_required`\nuntil the person approves it on their device.\n\nOn the organization's own roster (members, their roles, invitations, ownership, its\npeople's API keys) the organization's own rules hold, as on its People page: an\nadmin cannot change or remove an owner, nobody removes themselves, only the owner\ntransfers ownership, a staff-only role is `role_not_assignable`, and a customer\norganization's roster — administered under Organization › Team — is `409 managed_elsewhere`. A DPoP-bound token is presented as\n`Authorization: DPoP ` with a proof.\n"},"OrganizationAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"An organization member's OAuth access token from the PLATFORM ROOT, audienced to the\nroot's `/mcp` (`cbox login` at the root; an agent signed in there). Presented on the\nROOT's host, with `Cbox-Environment` naming the environment of the person's\norganization to act in. It runs what that environment's console runs — when the\nperson's role administers environments and their membership reaches this one — and\nonly within the scopes it carries. Every critical operation answers\n`202 approval_required` until the person approves it on their device. A DPoP-bound\ntoken is presented as `Authorization: DPoP ` with a proof.\n"},"AppClientCredentials":{"type":"http","scheme":"basic","description":"Your APP's own client credentials — `client_id:client_secret` as HTTP Basic\n(`client_secret_basic`). `client_secret_post` and `private_key_jwt` are accepted\ntoo, in the body, exactly as at the token endpoint.\n"},"VaultManagerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"An OAuth access token carrying the `vault.manage` scope. NOT an environment API\nkey: these routes are guarded by `scope:vault.manage`, which introspects an\naccess token, and a `cbid_env_` key introspects as inactive. Its `org` claim\nselects the organization whose secrets it administers.\n"},"AgentToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"An OAuth access token carrying the `vault.lease` scope. Its `org` claim selects\nthe organization whose secrets it may open — the vault's tenancy boundary.\n"},"AuthenticatorToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A DPoP-bound OAuth access token held by the Cbox ID authenticator app, obtained\nvia authorization_code + PKCE (S256) as a public client.\n\nBecause the token carries a `cnf.jkt`, every request must present it under the\n`DPoP` auth scheme together with a matching proof — `htm`, `htu`, a fresh `jti`,\nan `iat` within 60 seconds, and an `ath` equal to the SHA-256 of the token\nitself. A plain `Bearer` presentation of a bound token is rejected.\n"},"AppsAppAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"OAuth access token","description":"An access token issued by the current environment with the operation’s required scope and caller type. DPoP-bound tokens require their proof."},"PersonToken":{"type":"http","scheme":"bearer","description":"An access token you delegated, carrying `account:*` scopes. Management keys are refused."},"OrganizationOrganizationAccessToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"An organization member's access token from the platform root, audienced to the root's\n`/mcp`. Bounded by the person's role in the organization and by its scopes. A DPoP-bound\ntoken is presented as `Authorization: DPoP ` with a proof.\n"},"OrganizationApiKey":{"type":"http","scheme":"bearer","description":"An organization key, `cbid_ws_…` — a role, optionally narrowed by scopes. Create and revoke keys in the console (Owner/Admin), or with `POST /workspace/keys`."},"OperatorToken":{"type":"http","scheme":"bearer","description":"An access token delegated by an active platform operator, carrying `operator:*` scopes. Management keys are refused."}}}} diff --git a/scripts/generate_management.py b/scripts/generate_management.py index 50e10e6..d33f4bc 100644 --- a/scripts/generate_management.py +++ b/scripts/generate_management.py @@ -7,11 +7,19 @@ refresh one vendored spec from a live host python -m scripts.generate_management --fetch all=https://id.example.com refresh all four from one (self-hosted) host + python -m scripts.generate_management --fetch v1=https://api.cboxid.com + refresh openapi/openapi.json (the /v1 API) python -m scripts.generate_management --check exit 1 when the generated code is stale A small generator on purpose: the output is meant to be read. It knows exactly the subset of JSON Schema the server's spec builder emits, and fails loudly on anything it does not understand rather than guessing. The Python twin of id-js's ``scripts/generate-management.ts``. + +The four plane documents describe ``{host}/api/v1``, which every client calls by default. +``openapi/openapi.json`` is the ``/v1`` API (``https://api.cboxid.com/v1``): one document +for every plane. The generator finds each operation's ``/v1`` route there by its action +name (``x-action`` / ``x-action-aliases``), or through :data:`V1_OVERRIDES`, and writes it +into the operation table, so a client given ``api_url`` calls the same method on ``/v1``. """ from __future__ import annotations @@ -88,13 +96,57 @@ class PlaneConfig: WRITES = frozenset({"POST", "PUT", "PATCH", "DELETE"}) DANGERS = frozenset({"read", "write", "destructive", "critical"}) +#: The ``/v1`` document, served at ``https://api.cboxid.com/openapi.json``. +V1_SPEC = "openapi.json" +V1_SPEC_PATH = "/openapi.json" + +#: The first word of a ``/v1`` operation's tag, per plane (``Organization › Team``). +V1_TAGS: dict[str, str] = { + "environment": "Environment", + "workspace": "Organization", + "platform": "Admin", + "account": "Account", +} + +#: Query parameters that page a ``/v1`` list, never a moved path parameter. +V1_PAGING = frozenset({"limit", "after", "before", "cursor", "page", "per_page"}) + +#: Operations the ``/v1`` document does not name by the same action: ``(plane, key)`` → +#: ``(METHOD, /v1 path)``, or ``None`` when the operation has no ``/v1`` counterpart. +V1_OVERRIDES: dict[tuple[str, str], tuple[str, str] | None] = { + # Every plane polled its own `…/action-approvals/{id}`; /v1 has one approvals resource, + # and the credential picks the scope. + ("environment", "action_approvals.get"): ("GET", "/v1/approvals/{id}"), + ("workspace", "action_approvals.get"): ("GET", "/v1/approvals/{id}"), + ("platform", "action_approvals.get"): ("GET", "/v1/admin/approvals/{id}"), + ("account", "action_approvals.get"): ("GET", "/v1/me/approvals/{id}"), + # An organization's domains are one /v1 resource with SSO's domains. + ("environment", "organizations.domains.list"): ("GET", "/v1/organization-domains"), + ("environment", "organizations.domains.add"): ("POST", "/v1/organization-domains"), + ("environment", "organizations.domains.remove"): ("DELETE", "/v1/organization-domains/{id}"), + ("environment", "organizations.domains.verify"): ( + "POST", + "/v1/organization-domains/{id}/verify", + ), + ("environment", "organizations.domains.capture"): ("PATCH", "/v1/organization-domains/{id}"), + ("workspace", "keys.environment.revoke"): ("DELETE", "/v1/environment-keys/{id}"), + ("workspace", "team.role"): ("PATCH", "/v1/members/{id}"), + ("platform", "platform.organizations.set_status"): ("PATCH", "/v1/admin/organizations/{id}"), + # Customer accounts are not created or suspended over /v1. + ("platform", "platform.workspaces.create"): None, + ("platform", "platform.workspaces.set_status"): None, +} + #: What a generated module imports, by source. Only the names a module uses are imported. IMPORTS: tuple[tuple[str, tuple[str, ...]], ...] = ( ("collections.abc", ("Iterator", "Mapping")), ("typing", ("Any", "Literal", "TypeAlias", "overload")), ("typing_extensions", ("NotRequired", "TypedDict")), ("..client", ("ManagementClient",)), - ("..models", ("ApiResponse", "ApprovalMode", "OperationSpec", "PendingApprovalResult")), + ( + "..models", + ("ApiResponse", "ApprovalMode", "OperationSpec", "PendingApprovalResult", "V1Route"), + ), ("..transport", ("ManagementTransport",)), ) @@ -268,10 +320,168 @@ class _Node: ops: list[Operation] = field(default_factory=list) +@dataclass(frozen=True) +class V1Plan: + """One operation's ``/v1`` route, as the generated ``V1Route`` will say it.""" + + method: str + path: str + path_params: tuple[str, ...] + query_params: tuple[tuple[str, str], ...] + body_params: tuple[tuple[str, str], ...] + pagination: str | None + + +class V1Index: + """The ``/v1`` document, looked up by plane and action name.""" + + def __init__(self, spec: Json) -> None: + self.spec = spec + self.by_action: dict[tuple[str, str], list[tuple[str, str, Json]]] = {} + self.by_route: dict[tuple[str, str], Json] = {} + #: A route that is not an action is found by its operationId, plane-prefixed on /v1. + self.by_operation_id: dict[str, tuple[str, str, Json]] = {} + + for path, raw_item in obj(spec.get("paths")).items(): + item = obj(raw_item) + + for method in METHODS: + op = item.get(method) + + if not isinstance(op, dict): + continue + + self.by_route[(method.upper(), path)] = op + tags = [t for t in arr(op.get("tags")) if isinstance(t, str)] + plane = tags[0].split(" ")[0] if tags else "" + names = [op.get("x-action"), *arr(op.get("x-action-aliases"))] + + for name in names: + if isinstance(name, str): + entry = (method.upper(), path, op) + self.by_action.setdefault((plane, name), []).append(entry) + + if isinstance(op.get("operationId"), str): + self.by_operation_id[op["operationId"]] = (method.upper(), path, op) + + def _deref(self, value: object, kind: str) -> Json: + if isinstance(value, dict) and isinstance(value.get("$ref"), str): + name = value["$ref"].split("/")[-1] + target = obj(obj(self.spec.get("components")).get(kind)).get(name) + + if not isinstance(target, dict): + raise GeneratorError(f"openapi.json: unresolved {value['$ref']}") + + return target + + return obj(value) + + def _body_fields(self, op: Json) -> set[str]: + if op.get("requestBody") is None: + return set() + + body = self._deref(op["requestBody"], "requestBodies") + json_body = obj(obj(body.get("content")).get("application/json")) + schema = self._deref(json_body.get("schema"), "schemas") + fields = set(obj(schema.get("properties"))) + + for branch in arr(schema.get("allOf")): + fields |= set(obj(self._deref(branch, "schemas").get("properties"))) + + return fields + + def route(self, plane: str, op: Operation) -> V1Plan | None: + """The ``/v1`` route of ``op``, or ``None`` when it has none (an override says so).""" + where = f"{plane} {op.key}" + override_key = (plane, op.key) + + if override_key in V1_OVERRIDES: + target = V1_OVERRIDES[override_key] + + if target is None: + return None + + method, path = target + found = self.by_route.get((method, path)) + + if found is None: + raise GeneratorError(f"openapi.json: {where} overrides to {method} {path}, absent") + + v1_op = found + else: + hits = self.by_action.get((V1_TAGS[plane], op.action or ""), []) + + if op.action is None and op.operation_id is not None: + prefixes = dict.fromkeys((plane, V1_TAGS[plane].lower())) + found_ids = [self.by_operation_id.get(f"{p}_{op.operation_id}") for p in prefixes] + hits = [hit for hit in found_ids if hit is not None] + + if len(hits) != 1: + raise GeneratorError( + f"openapi.json: {where} matches {len(hits)} /v1 operations; " + "add it to V1_OVERRIDES" + ) + + method, path, v1_op = hits[0] + + parameters = [self._deref(p, "parameters") for p in arr(v1_op.get("parameters"))] + placeholders = re.findall(r"\{([^}]+)\}", path) + query = [p["name"] for p in parameters if p.get("in") == "query" and "name" in p] + body = self._body_fields(v1_op) + own = op.path_params + filled: dict[str, str] = {} + in_query: list[tuple[str, str]] = [] + in_body: list[tuple[str, str]] = [] + rest: list[str] = [] + + for index, name in enumerate(own): + # `/apps/{id}/secrets/{secret_id}`: that `id` is the parent, not the /v1 `{id}`. + parent_id = name == "id" and index < len(own) - 1 + + if name in placeholders and not parent_id: + filled[name] = name + elif name in query: + in_query.append((name, name)) + elif name in body: + in_body.append((name, name)) + else: + rest.append(name) + + # The object's own id (the last parameter left) fills the /v1 path; a parent left + # over is named in the query (`/v1/app-secrets/{id}?app_id=…`). + open_slots = [p for p in placeholders if p not in filled] + + if len(rest) < len(open_slots): + raise GeneratorError(f"openapi.json: {where}: nothing fills {open_slots}") + + if open_slots: + for slot, name in zip(open_slots, rest[-len(open_slots) :], strict=True): + filled[slot] = name + rest = rest[: -len(open_slots)] + + used = {wire for wire, _ in in_query} + spare = [q for q in query if q not in used and q not in V1_PAGING and q not in own] + + for name in rest: + if not spare: + raise GeneratorError(f"openapi.json: {where}: no place for {name}") + in_query.append((spare.pop(0), name)) + + return V1Plan( + method=method, + path=path.removeprefix("/v1"), + path_params=tuple(filled[p] for p in placeholders), + query_params=tuple(in_query), + body_params=tuple(in_body), + pagination="cursor" if "after" in query else "page" if "page" in query else None, + ) + + class Generator: - def __init__(self, spec: Json, config: PlaneConfig) -> None: + def __init__(self, spec: Json, config: PlaneConfig, v1: V1Index | None = None) -> None: self.spec = spec self.config = config + self.v1 = v1 self.blocks: list[str] = [] self.used: set[str] = set() self.imports: set[str] = set() @@ -801,6 +1011,7 @@ def render(self) -> tuple[str, list[Operation]]: f"approval={literal(op.approval)}", f"body={literal(op.input_kind == 'body')}", f"pagination={literal(op.pagination)}", + *self.v1_fields(op), ] ) rows.append(f" {literal(op.key)}: OperationSpec({spec}),") @@ -875,7 +1086,7 @@ def render(self) -> tuple[str, list[Operation]]: header = ( f"# GENERATED by scripts/generate_management.py from openapi/{config.module}.yaml" - " — do not edit.\n" + f"{' and openapi/' + V1_SPEC if self.v1 is not None else ''} — do not edit.\n" "# Regenerate with `python -m scripts.generate_management`.\n" ) module_doc = f'"""{_escape_doc(title)}: typed client, schemas and operation table."""\n' @@ -902,6 +1113,40 @@ def render(self) -> tuple[str, list[Operation]]: return code, operations + def v1_fields(self, op: Operation) -> list[str]: + """``v1=V1Route(…)``, or ``legacy_only=True``, for one row of the operation table.""" + if self.v1 is None: + return [] + + plan = self.v1.route(self.config.plane, op) + + if plan is None: + return ["legacy_only=True"] + + self.use("V1Route") + + def names(values: tuple[str, ...]) -> str: + joined = ", ".join(literal(v) for v in values) + return f"({joined},)" if len(values) == 1 else f"({joined})" + + def pairs(values: tuple[tuple[str, str], ...]) -> str: + joined = ", ".join(f"({literal(wire)}, {literal(name)})" for wire, name in values) + return f"({joined},)" if len(values) == 1 else f"({joined})" + + route = [f"method={literal(plan.method)}", f"path={literal(plan.path)}"] + route.append(f"path_params={names(plan.path_params)}") + + if plan.query_params: + route.append(f"query_params={pairs(plan.query_params)}") + + if plan.body_params: + route.append(f"body_params={pairs(plan.body_params)}") + + if plan.pagination is not None: + route.append(f"pagination={literal(plan.pagination)}") + + return [f"v1=V1Route({', '.join(route)})"] + def response_types(self, op: Operation, base: str) -> tuple[str, str | None]: """The type of ``data`` in the response, and of one item when the list is paged.""" schema = op.response_schema @@ -1121,14 +1366,14 @@ class Result: skipped: list[str] -def generate_plane(spec: Json, config: PlaneConfig) -> Result: - """Generate one plane's client module from its parsed spec.""" +def generate_plane(spec: Json, config: PlaneConfig, v1: V1Index | None = None) -> Result: + """Generate one plane's client module from its parsed spec (and the ``/v1`` document).""" version = spec.get("openapi") if not isinstance(version, str) or not version.startswith("3."): raise GeneratorError(f"{config.module}: not an OpenAPI 3 document") - generator = Generator(spec, config) + generator = Generator(spec, config, v1) code, operations = generator.render() return Result(code=code, operations=len(operations), skipped=generator.skipped) @@ -1137,11 +1382,12 @@ def generate_plane(spec: Json, config: PlaneConfig) -> Result: def generate_all(root: Path = ROOT) -> dict[Path, Result]: """Generate every plane from the vendored specs in ``openapi/``, keyed by output path.""" results: dict[Path, Result] = {} + v1 = V1Index(json.loads((root / "openapi" / V1_SPEC).read_text("utf-8"))) for config in PLANES: spec = load_spec((root / "openapi" / f"{config.module}.yaml").read_text("utf-8")) out = root / "src" / "cbox_id" / "management" / "generated" / f"{config.module}.py" - results[out] = generate_plane(spec, config) + results[out] = generate_plane(spec, config, v1) return results @@ -1166,6 +1412,24 @@ def fetch_spec(config: PlaneConfig, target: str) -> None: print(f"fetched {config.module} <- {url}") +def fetch_v1_spec(target: str) -> None: + import httpx + + url = target if target.endswith(".json") else f"{target.rstrip('/')}{V1_SPEC_PATH}" + response = httpx.get(url, headers={"Accept": "application/json"}) + + if response.status_code != 200: + raise GeneratorError(f"GET {url} answered {response.status_code}") + + parsed = json.loads(response.text) + + if not isinstance(parsed, dict) or not isinstance(parsed.get("openapi"), str): + raise GeneratorError(f"GET {url} did not return an OpenAPI document") + + (SPEC_DIR / V1_SPEC).write_text(response.text, "utf-8") + print(f"fetched v1 <- {url}") + + def main(argv: Sequence[str] | None = None) -> int: parser = argparse.ArgumentParser(prog="python -m scripts.generate_management") parser.add_argument("--check", action="store_true", help="exit 1 when generated code is stale") @@ -1174,7 +1438,7 @@ def main(argv: Sequence[str] | None = None) -> int: action="append", default=[], metavar="PLANE=URL", - help="refresh a vendored spec from a running server first (PLANE may be `all`)", + help="refresh a vendored spec from a running server first (PLANE may be `all` or `v1`)", ) options = parser.parse_args(argv) @@ -1186,10 +1450,15 @@ def main(argv: Sequence[str] | None = None) -> int: "--fetch takes plane=url, e.g. --fetch environment=https://acme.cboxid.com" ) + if plane == "v1": + fetch_v1_spec(url) + continue + configs = [p for p in PLANES if plane in ("all", p.plane)] if not configs: - parser.error(f"unknown plane {plane}; use {', '.join(p.plane for p in PLANES)} or all") + known = ", ".join(p.plane for p in PLANES) + parser.error(f"unknown plane {plane}; use {known}, all or v1") for config in configs: fetch_spec(config, url) diff --git a/src/cbox_id/__init__.py b/src/cbox_id/__init__.py index 2552688..d105698 100644 --- a/src/cbox_id/__init__.py +++ b/src/cbox_id/__init__.py @@ -31,7 +31,16 @@ PipeReauthorizationRequiredError, PipeTemporarilyUnavailableError, ) +from .events import ( + EVENT_PREFIX, + RENAMED_EVENTS, + current_event_name, + event_name_aliases, + legacy_event_name, + same_event, +) from .frontend import FrontendClient, FrontendConfig, FrontendSession +from .ids import is_prefixed_id, raw_id, same_id from .legacy import LegacyUser, handle_legacy_login from .models import ( ActiveOrganization, @@ -54,6 +63,15 @@ from .webhook import verify_standard_webhook, verify_webhook __all__ = [ + "EVENT_PREFIX", + "RENAMED_EVENTS", + "current_event_name", + "event_name_aliases", + "is_prefixed_id", + "legacy_event_name", + "raw_id", + "same_event", + "same_id", "PermissionDecision", "FEATURE_FLAGS_SCOPE", "PipeLeaseDeniedError", diff --git a/src/cbox_id/_api.py b/src/cbox_id/_api.py new file mode 100644 index 0000000..dc1a016 --- /dev/null +++ b/src/cbox_id/_api.py @@ -0,0 +1,34 @@ +"""Where the SDK's own API calls go when ``api_url`` is set.""" + +from __future__ import annotations + +from urllib.parse import urlsplit + +from .errors import ConfigurationError + +_LOOPBACK = frozenset({"localhost", "127.0.0.1", "::1"}) + + +def v1_base_url(api_url: str) -> str: + """``{api_url}/v1``: Cbox ID's ``/v1`` API, given with or without its version. + + ``https://api.cboxid.com`` and ``https://api.cboxid.com/v1`` are the same setting. + """ + parts = urlsplit(api_url.strip()) + + if parts.scheme == "" or parts.hostname is None or parts.query or parts.fragment: + raise ConfigurationError("Cbox ID config `api_url` is not a valid URL.") + + if parts.username is not None or parts.password is not None: + raise ConfigurationError("Cbox ID config `api_url` must not carry credentials.") + + loopback = parts.hostname in _LOOPBACK + + if parts.scheme != "https" and not (parts.scheme == "http" and loopback): + raise ConfigurationError( + f"Cbox ID config `api_url` must be https (got {parts.scheme}://{parts.hostname})." + ) + + path = parts.path.rstrip("/").removesuffix("/v1") + + return f"{parts.scheme}://{parts.netloc}{path}/v1" diff --git a/src/cbox_id/client.py b/src/cbox_id/client.py index 1e5697a..9e2cfa2 100644 --- a/src/cbox_id/client.py +++ b/src/cbox_id/client.py @@ -15,6 +15,7 @@ from jwt.algorithms import ECAlgorithm, RSAAlgorithm from . import claims as _claims +from ._api import v1_base_url from .authz import AuthzManifest from .decisions import PermissionDecision, request_decision from .errors import ( @@ -69,6 +70,8 @@ def __init__(self, config: CboxIdConfig, http_client: httpx.Client | None = None raise ConfigurationError("Cbox ID config `client_id` is required.") if not config.redirect_uri: raise ConfigurationError("Cbox ID config `redirect_uri` is required.") + if config.api_url: + v1_base_url(config.api_url) self._config = config self._http = http_client or httpx.Client(timeout=config.timeout_seconds) @@ -372,6 +375,7 @@ def pipes(self) -> PipesClient: self._lease_token, client_id=self._config.client_id, http_client=self._http, + api_url=self._config.api_url, ) return self._pipes @@ -545,7 +549,8 @@ def publish_manifest(self, manifest: AuthzManifest) -> dict[str, Any]: Run this on deploy. It mints a client-credentials token with the ``apps.manifest`` scope, then POSTs the manifest to - ``{issuer}/api/v1/apps/manifest``. The app owns what roles mean; Cbox ID owns + ``{issuer}/api/v1/apps/manifest`` (``{api_url}/v1/app-manifests`` when the config sets + ``api_url``). The app owns what roles mean; Cbox ID owns who holds them. Republishing an unchanged catalog is a server-side no-op. Returns the server's sync summary (``unchanged``, ``roles_declared``, @@ -558,7 +563,11 @@ def publish_manifest(self, manifest: AuthzManifest) -> dict[str, Any]: ) token = self.machine_token(scopes=["apps.manifest"]) - url = f"{self._config.issuer.rstrip('/')}/api/v1/apps/manifest" + url = ( + f"{v1_base_url(self._config.api_url)}/app-manifests" + if self._config.api_url + else f"{self._config.issuer.rstrip('/')}/api/v1/apps/manifest" + ) try: response = self._http.post( url, diff --git a/src/cbox_id/decisions.py b/src/cbox_id/decisions.py index 03c2f71..8bc76f4 100644 --- a/src/cbox_id/decisions.py +++ b/src/cbox_id/decisions.py @@ -11,6 +11,7 @@ import httpx from .errors import AuthenticationError, ConfigurationError +from .ids import same_id from .models import OrganizationRole @@ -93,9 +94,10 @@ def _parse( data.get("mode") != "rbac" or not isinstance(who, dict) or who.get("type") != "user" - or who.get("id") != subject + # The ids may come back prefixed (`usr_…`, `org_…`): the same object as the raw ones. + or not same_id(who.get("id"), subject) or "organization" not in data - or data["organization"] != organization + or not _same_organization(data["organization"], organization) or data.get("client_id") != client_id or type(data.get("organization_active")) is not bool or type(data.get("allowed")) is not bool @@ -127,3 +129,9 @@ def _parse( if data["allowed"] != decision.allowed(): raise AuthenticationError("Permission decision result is inconsistent.") return decision + + +def _same_organization(answered: Any, asked: str | None) -> bool: + if asked is None: + return answered is None + return isinstance(answered, str) and same_id(answered, asked) diff --git a/src/cbox_id/events.py b/src/cbox_id/events.py new file mode 100644 index 0000000..7799abc --- /dev/null +++ b/src/cbox_id/events.py @@ -0,0 +1,60 @@ +"""Cbox ID's webhook event names, old and new. + +Cbox ID is adding its product key to every event type: ``organization.member_added`` +becomes ``id.organization.member_added``, and ``user.login`` becomes +``id.user.signed_in`` (a past verb). For a while a delivery may carry either name, so treat +the two as one event:: + + event = json.loads(body) + + if same_event(event["type"], "organization.member_added"): + ... + + handler = HANDLERS.get(legacy_event_name(event["type"])) # keyed by today's names +""" + +from __future__ import annotations + +from collections.abc import Mapping +from types import MappingProxyType + +#: The product key Cbox ID puts in front of its event types. +EVENT_PREFIX = "id." + +#: Old names whose new name is not just :data:`EVENT_PREFIX` added. +RENAMED_EVENTS: Mapping[str, str] = MappingProxyType({"user.login": "id.user.signed_in"}) + +_WILDCARD = "*" + + +def current_event_name(event_type: str) -> str: + """The ``id.*`` name of an event type, whichever name it was given in.""" + if event_type == _WILDCARD or event_type.startswith(EVENT_PREFIX): + return event_type + + return RENAMED_EVENTS.get(event_type, EVENT_PREFIX + event_type) + + +def legacy_event_name(event_type: str) -> str: + """The name an event type had before the ``id.*`` names, whichever name it was given in.""" + if not event_type.startswith(EVENT_PREFIX): + return event_type + + for old, new in RENAMED_EVENTS.items(): + if new == event_type: + return old + + return event_type[len(EVENT_PREFIX) :] + + +def event_name_aliases(event_type: str) -> tuple[str, ...]: + """Both names of an event type, the one given first: for subscribing to either.""" + return tuple( + dict.fromkeys((event_type, legacy_event_name(event_type), current_event_name(event_type))) + ) + + +def same_event(a: str, b: str) -> bool: + """Whether two event type names are the same event (``user.login`` is + ``id.user.signed_in``).""" + return a == b or legacy_event_name(a) == legacy_event_name(b) diff --git a/src/cbox_id/ids.py b/src/cbox_id/ids.py new file mode 100644 index 0000000..e05adfc --- /dev/null +++ b/src/cbox_id/ids.py @@ -0,0 +1,49 @@ +"""Cbox ID's object ids, in either spelling. + +Cbox ID is moving its API, webhooks and console to prefixed public ids (``org_01J9Z…``, +``usr_01J9Z…``: a type prefix and the object's ULID), while token claims (``sub``, +``org``) keep the raw ULID. For a while both spellings arrive, often for the same object +in the same request, so compare ids with :func:`same_id`, never with ``==``. + +Only ``_`` is unwrapped. Anything else — test ids such as ``org_1``, keys, +slugs — is compared exactly as given. +""" + +from __future__ import annotations + +import re + +#: A type prefix and a ULID (26 Crockford base32 characters). +_PUBLIC_ID = re.compile(r"\A[a-z][a-z0-9]{0,15}_([0-9A-HJKMNP-TV-Z]{26})\Z", re.IGNORECASE) + + +def raw_id(value: str) -> str: + """The id without its type prefix: the raw ULID for ``org_01J9Z…``, ``value`` otherwise. + + The ULID comes back lowercase, the way Cbox ID stores it and token claims carry it. + """ + match = _PUBLIC_ID.match(value) + return match.group(1).lower() if match else value + + +def is_prefixed_id(value: str) -> bool: + """Whether ``value`` is a prefixed public id (``org_01J9Z…``).""" + return _PUBLIC_ID.match(value) is not None + + +def same_id(a: str | None, b: str | None) -> bool: + """Whether two ids name the same object: ``org_01J9Z…`` and ``01j9z…`` do. + + ``None`` and the empty string never match anything. + """ + if not a or not b: + return False + + if a == b: + return True + + raw_a, raw_b = raw_id(a), raw_id(b) + + # Unwrapped on either side: compare the ULIDs regardless of case. Neither side a public + # id: they were already compared exactly. + return (raw_a != a or raw_b != b) and raw_a.lower() == raw_b.lower() diff --git a/src/cbox_id/management/__init__.py b/src/cbox_id/management/__init__.py index 5600aec..cc118b8 100644 --- a/src/cbox_id/management/__init__.py +++ b/src/cbox_id/management/__init__.py @@ -5,10 +5,14 @@ - :class:`EnvironmentClient`: one environment's tenancy, on its own host (``cbid_env_…`` key or a delegated access token). -- :class:`WorkspaceClient`: the workspace above its environments (``cbid_ws_…`` key). +- :class:`OrganizationClient` (also :class:`WorkspaceClient`, its old name): the + organization above its environments (``cbid_org_…`` or ``cbid_ws_…`` key). - :class:`PlatformClient`: the deployment itself, for operators (delegated token only). - :class:`AccountClient`: a person's own account (delegated token only). +Every client calls ``{host}/api/v1`` by default. Give it ``api_url="https://api.cboxid.com"`` +to call Cbox ID's ``/v1`` API instead, with the same methods. + Server-side code only: every client holds a management credential. Schema and operation types live in the plane's module, e.g. ``cbox_id.management.generated.environment.App``. """ @@ -60,7 +64,9 @@ PendingApproval, PendingApprovalResult, Plane, + V1Route, ) +from .organization import OrganizationClient from .transport import ManagementTransport, RetryOptions, retry_after_seconds __all__ = [ @@ -94,12 +100,14 @@ "ManagementNetworkError", "ManagementTransport", "OperationSpec", + "OrganizationClient", "Pagination", "PendingApproval", "PendingApprovalResult", "Plane", "PlatformClient", "RetryOptions", + "V1Route", "WorkspaceClient", "account_api", "audit_event_document", diff --git a/src/cbox_id/management/client.py b/src/cbox_id/management/client.py index bf70514..ceb25bb 100644 --- a/src/cbox_id/management/client.py +++ b/src/cbox_id/management/client.py @@ -24,8 +24,14 @@ class ManagementClient: (``https://acme.cboxid.com``) for the environment and account planes, the platform-root host for the workspace and platform planes. ``/api/v1`` is appended unless it is already there. - :param api_key: A management key: ``cbid_env_…`` (environment plane) or ``cbid_ws_…`` - (workspace plane). + :param api_url: Cbox ID's ``/v1`` API instead (``https://api.cboxid.com``; ``/v1`` is + appended unless it is already there), in place of ``base_url``. Every plane is + served there and the credential decides where a call acts. The methods stay the + same: each calls its ``/v1`` route, and the ``/v1`` shapes (an unwrapped object, the + ``{object: "list", …}`` envelope, RFC 9457 problems) come back as they do from + ``/api/v1``. Left out, nothing changes. + :param api_key: A management key: ``cbid_env_…`` (environment plane) or ``cbid_org_…`` + (organization plane; ``cbid_ws_…`` keys keep working). :param access_token: A delegated OAuth access token, or a callable returning one (called before every request, so it can refresh). Platform and account planes accept nothing else. @@ -56,6 +62,7 @@ def __init__( self, *, base_url: str | None = None, + api_url: str | None = None, api_key: str | None = None, access_token: AccessToken | None = None, environment: str | None = None, @@ -70,7 +77,8 @@ def __init__( ) -> None: self.core = ManagementTransport( self._plane, - base_url=base_url or self._default_base_url, + base_url=base_url if api_url else base_url or self._default_base_url, + api_url=api_url, api_key=api_key, access_token=access_token, environment=environment, @@ -90,7 +98,7 @@ def _bind(self, core: ManagementTransport) -> None: @property def base_url(self) -> str: - """The plane's base URL, ending in ``/api/v1``.""" + """The plane's base URL, ending in ``/api/v1`` (``/v1`` with ``api_url``).""" return self.core.base_url @overload @@ -133,7 +141,8 @@ def request( approval_id: str | None = None, headers: Mapping[str, str] | None = None, ) -> ApiResponse[Any] | PendingApprovalResult[Any]: - """Call a route by method and path (relative to ``/api/v1``): anything not generated.""" + """Call a route by method and path (relative to ``/api/v1``, or ``/v1`` with + ``api_url``): anything not generated.""" return self.core.request( method, path, diff --git a/src/cbox_id/management/generated/account.py b/src/cbox_id/management/generated/account.py index 3044108..fd92e33 100644 --- a/src/cbox_id/management/generated/account.py +++ b/src/cbox_id/management/generated/account.py @@ -1,4 +1,4 @@ -# GENERATED by scripts/generate_management.py from openapi/account.yaml — do not edit. +# GENERATED by scripts/generate_management.py from openapi/account.yaml and openapi/openapi.json — do not edit. # Regenerate with `python -m scripts.generate_management`. """Cbox ID — My Account API: typed client, schemas and operation table.""" @@ -10,7 +10,7 @@ from typing_extensions import NotRequired, TypedDict from ..client import ManagementClient -from ..models import ApiResponse, ApprovalMode, OperationSpec, PendingApprovalResult +from ..models import ApiResponse, ApprovalMode, OperationSpec, PendingApprovalResult, V1Route from ..transport import ManagementTransport # ── Schemas (components.schemas) ────────────────────────────────────────────────────────────────── @@ -153,27 +153,27 @@ class WaitlistsLeaveBody(TypedDict): #: Every operation of the Cbox ID — My Account API, keyed by action name. ACCOUNT_OPERATIONS: Mapping[str, OperationSpec] = { - "action_approvals.get": OperationSpec(action=None, operation_id=None, method="GET", path="/me/action-approvals/{id}", path_params=("id",), scope=None, danger=None, approval=False, body=False, pagination=None), - "account.api_keys.create": OperationSpec(action="account.api_keys.create", operation_id="account_api_keys_create", method="POST", path="/me/organizations/{organization_id}/api-keys", path_params=("organization_id",), scope="account:api_keys:write", danger="critical", approval=True, body=True, pagination=None), - "account.api_keys.revoke": OperationSpec(action="account.api_keys.revoke", operation_id="account_api_keys_revoke", method="DELETE", path="/me/organizations/{organization_id}/api-keys/{key_id}", path_params=("organization_id", "key_id"), scope="account:api_keys:write", danger="destructive", approval=True, body=False, pagination=None), - "account.applications.revoke": OperationSpec(action="account.applications.revoke", operation_id="account_applications_revoke", method="DELETE", path="/me/applications/{client_id}", path_params=("client_id",), scope="account:applications:write", danger="destructive", approval=True, body=False, pagination=None), - "account.apps.list": OperationSpec(action="account.apps.list", operation_id="account_apps_list", method="GET", path="/me/apps", path_params=(), scope="account:apps:read", danger="read", approval=True, body=False, pagination=None), - "account.devices.remove": OperationSpec(action="account.devices.remove", operation_id="account_devices_remove", method="DELETE", path="/me/devices/{device_id}", path_params=("device_id",), scope="account:devices:write", danger="destructive", approval=True, body=False, pagination=None), - "account.email.confirmation.send": OperationSpec(action="account.email.confirmation.send", operation_id="account_email_confirmation_send", method="POST", path="/me/email/confirmation", path_params=(), scope="account:profile:write", danger="write", approval=True, body=False, pagination=None), - "account.mfa.sms.remove": OperationSpec(action="account.mfa.sms.remove", operation_id="account_mfa_sms_remove", method="DELETE", path="/me/mfa/sms", path_params=(), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None), - "account.organizations.leave": OperationSpec(action="account.organizations.leave", operation_id="account_organizations_leave", method="POST", path="/me/organizations/{organization_id}/leave", path_params=("organization_id",), scope="account:organizations:write", danger="destructive", approval=True, body=False, pagination=None), - "account.passkeys.remove": OperationSpec(action="account.passkeys.remove", operation_id="account_passkeys_remove", method="DELETE", path="/me/passkeys/{passkey_id}", path_params=("passkey_id",), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None), - "account.passkeys.rename": OperationSpec(action="account.passkeys.rename", operation_id="account_passkeys_rename", method="PATCH", path="/me/passkeys/{passkey_id}", path_params=("passkey_id",), scope="account:sign_in:write", danger="write", approval=True, body=True, pagination=None), - "account.pipes.disconnect": OperationSpec(action="account.pipes.disconnect", operation_id="account_pipes_disconnect", method="DELETE", path="/me/pipes/{provider}", path_params=("provider",), scope="account:pipes:write", danger="destructive", approval=True, body=False, pagination=None), - "account.profile.update": OperationSpec(action="account.profile.update", operation_id="account_profile_update", method="PATCH", path="/me/profile", path_params=(), scope="account:profile:write", danger="write", approval=True, body=True, pagination=None), - "account.sessions.revoke": OperationSpec(action="account.sessions.revoke", operation_id="account_sessions_revoke", method="DELETE", path="/me/sessions/{session_id}", path_params=("session_id",), scope="account:sessions:write", danger="destructive", approval=True, body=False, pagination=None), - "account.sessions.revoke_others": OperationSpec(action="account.sessions.revoke_others", operation_id="account_sessions_revoke_others", method="POST", path="/me/sessions/revoke-others", path_params=(), scope="account:sessions:write", danger="critical", approval=True, body=False, pagination=None), - "account.sign_in_methods.disconnect": OperationSpec(action="account.sign_in_methods.disconnect", operation_id="account_sign_in_methods_disconnect", method="DELETE", path="/me/sign-in-methods/{identity_id}", path_params=("identity_id",), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None), - "account.social.unlink": OperationSpec(action="account.social.unlink", operation_id="account_social_unlink", method="DELETE", path="/me/social/{provider}", path_params=("provider",), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None), - "account.totp.remove": OperationSpec(action="account.totp.remove", operation_id="account_totp_remove", method="DELETE", path="/me/two-factor/apps/{factor_id}", path_params=("factor_id",), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None), - "account.totp.rename": OperationSpec(action="account.totp.rename", operation_id="account_totp_rename", method="PATCH", path="/me/two-factor/apps/{factor_id}", path_params=("factor_id",), scope="account:sign_in:write", danger="write", approval=True, body=True, pagination=None), - "account.waitlists.join": OperationSpec(action="account.waitlists.join", operation_id="account_waitlists_join", method="POST", path="/me/services/{program}/waitlist", path_params=("program",), scope="account:waitlists:write", danger="write", approval=True, body=True, pagination=None), - "account.waitlists.leave": OperationSpec(action="account.waitlists.leave", operation_id="account_waitlists_leave", method="POST", path="/me/services/{program}/waitlist/leave", path_params=("program",), scope="account:waitlists:write", danger="write", approval=True, body=True, pagination=None), + "action_approvals.get": OperationSpec(action=None, operation_id=None, method="GET", path="/me/action-approvals/{id}", path_params=("id",), scope=None, danger=None, approval=False, body=False, pagination=None, v1=V1Route(method="GET", path="/me/approvals/{id}", path_params=("id",))), + "account.api_keys.create": OperationSpec(action="account.api_keys.create", operation_id="account_api_keys_create", method="POST", path="/me/organizations/{organization_id}/api-keys", path_params=("organization_id",), scope="account:api_keys:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/me/api-keys", path_params=(), query_params=(("organization_id", "organization_id"),))), + "account.api_keys.revoke": OperationSpec(action="account.api_keys.revoke", operation_id="account_api_keys_revoke", method="DELETE", path="/me/organizations/{organization_id}/api-keys/{key_id}", path_params=("organization_id", "key_id"), scope="account:api_keys:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/api-keys/{id}", path_params=("key_id",), query_params=(("organization_id", "organization_id"),))), + "account.applications.revoke": OperationSpec(action="account.applications.revoke", operation_id="account_applications_revoke", method="DELETE", path="/me/applications/{client_id}", path_params=("client_id",), scope="account:applications:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/applications/{id}", path_params=("client_id",))), + "account.apps.list": OperationSpec(action="account.apps.list", operation_id="account_apps_list", method="GET", path="/me/apps", path_params=(), scope="account:apps:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/me/apps", path_params=())), + "account.devices.remove": OperationSpec(action="account.devices.remove", operation_id="account_devices_remove", method="DELETE", path="/me/devices/{device_id}", path_params=("device_id",), scope="account:devices:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/devices/{id}", path_params=("device_id",))), + "account.email.confirmation.send": OperationSpec(action="account.email.confirmation.send", operation_id="account_email_confirmation_send", method="POST", path="/me/email/confirmation", path_params=(), scope="account:profile:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/me/email/confirmation", path_params=())), + "account.mfa.sms.remove": OperationSpec(action="account.mfa.sms.remove", operation_id="account_mfa_sms_remove", method="DELETE", path="/me/mfa/sms", path_params=(), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/mfa/sms", path_params=())), + "account.organizations.leave": OperationSpec(action="account.organizations.leave", operation_id="account_organizations_leave", method="POST", path="/me/organizations/{organization_id}/leave", path_params=("organization_id",), scope="account:organizations:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/me/organizations/{id}/leave", path_params=("organization_id",))), + "account.passkeys.remove": OperationSpec(action="account.passkeys.remove", operation_id="account_passkeys_remove", method="DELETE", path="/me/passkeys/{passkey_id}", path_params=("passkey_id",), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/passkeys/{id}", path_params=("passkey_id",))), + "account.passkeys.rename": OperationSpec(action="account.passkeys.rename", operation_id="account_passkeys_rename", method="PATCH", path="/me/passkeys/{passkey_id}", path_params=("passkey_id",), scope="account:sign_in:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/me/passkeys/{id}", path_params=("passkey_id",))), + "account.pipes.disconnect": OperationSpec(action="account.pipes.disconnect", operation_id="account_pipes_disconnect", method="DELETE", path="/me/pipes/{provider}", path_params=("provider",), scope="account:pipes:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/pipes/{id}", path_params=("provider",))), + "account.profile.update": OperationSpec(action="account.profile.update", operation_id="account_profile_update", method="PATCH", path="/me/profile", path_params=(), scope="account:profile:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/me/profile", path_params=())), + "account.sessions.revoke": OperationSpec(action="account.sessions.revoke", operation_id="account_sessions_revoke", method="DELETE", path="/me/sessions/{session_id}", path_params=("session_id",), scope="account:sessions:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/sessions/{id}", path_params=("session_id",))), + "account.sessions.revoke_others": OperationSpec(action="account.sessions.revoke_others", operation_id="account_sessions_revoke_others", method="POST", path="/me/sessions/revoke-others", path_params=(), scope="account:sessions:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/me/sessions/revoke-others", path_params=())), + "account.sign_in_methods.disconnect": OperationSpec(action="account.sign_in_methods.disconnect", operation_id="account_sign_in_methods_disconnect", method="DELETE", path="/me/sign-in-methods/{identity_id}", path_params=("identity_id",), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/sign-in-methods/{id}", path_params=("identity_id",))), + "account.social.unlink": OperationSpec(action="account.social.unlink", operation_id="account_social_unlink", method="DELETE", path="/me/social/{provider}", path_params=("provider",), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/social/{id}", path_params=("provider",))), + "account.totp.remove": OperationSpec(action="account.totp.remove", operation_id="account_totp_remove", method="DELETE", path="/me/two-factor/apps/{factor_id}", path_params=("factor_id",), scope="account:sign_in:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/me/totp-factors/{id}", path_params=("factor_id",))), + "account.totp.rename": OperationSpec(action="account.totp.rename", operation_id="account_totp_rename", method="PATCH", path="/me/two-factor/apps/{factor_id}", path_params=("factor_id",), scope="account:sign_in:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/me/totp-factors/{id}", path_params=("factor_id",))), + "account.waitlists.join": OperationSpec(action="account.waitlists.join", operation_id="account_waitlists_join", method="POST", path="/me/services/{program}/waitlist", path_params=("program",), scope="account:waitlists:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/me/services/{id}/join-waitlist", path_params=("program",))), + "account.waitlists.leave": OperationSpec(action="account.waitlists.leave", operation_id="account_waitlists_leave", method="POST", path="/me/services/{program}/waitlist/leave", path_params=("program",), scope="account:waitlists:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/me/services/{id}/leave-waitlist", path_params=("program",))), } diff --git a/src/cbox_id/management/generated/environment.py b/src/cbox_id/management/generated/environment.py index 510a35f..f3ca298 100644 --- a/src/cbox_id/management/generated/environment.py +++ b/src/cbox_id/management/generated/environment.py @@ -1,4 +1,4 @@ -# GENERATED by scripts/generate_management.py from openapi/environment.yaml — do not edit. +# GENERATED by scripts/generate_management.py from openapi/environment.yaml and openapi/openapi.json — do not edit. # Regenerate with `python -m scripts.generate_management`. """Cbox ID — Environment Management API: typed client, schemas and operation table.""" @@ -10,7 +10,7 @@ from typing_extensions import NotRequired, TypedDict from ..client import ManagementClient -from ..models import ApiResponse, ApprovalMode, OperationSpec, PendingApprovalResult +from ..models import ApiResponse, ApprovalMode, OperationSpec, PendingApprovalResult, V1Route from ..transport import ManagementTransport # ── Schemas (components.schemas) ────────────────────────────────────────────────────────────────── @@ -4437,274 +4437,274 @@ class WebhooksUpdateBody(TypedDict): #: Every operation of the Cbox ID — Environment Management API, keyed by action name. ENVIRONMENT_OPERATIONS: Mapping[str, OperationSpec] = { - "access_reviews.close": OperationSpec(action="access_reviews.close", operation_id="access_reviews_close", method="POST", path="/access-reviews/{id}/close", path_params=("id",), scope="governance:write", danger="destructive", approval=True, body=True, pagination=None), - "access_reviews.create": OperationSpec(action="access_reviews.create", operation_id="access_reviews_create", method="POST", path="/access-reviews", path_params=(), scope="governance:write", danger="write", approval=True, body=True, pagination=None), - "access_reviews.get": OperationSpec(action="access_reviews.get", operation_id="access_reviews_get", method="GET", path="/access-reviews/{id}", path_params=("id",), scope="governance:read", danger="read", approval=True, body=False, pagination=None), - "access_reviews.items.decide": OperationSpec(action="access_reviews.items.decide", operation_id="access_reviews_items_decide", method="POST", path="/access-reviews/{id}/items/{item_id}", path_params=("id", "item_id"), scope="governance:write", danger="write", approval=True, body=True, pagination=None), - "access_reviews.items.list": OperationSpec(action="access_reviews.items.list", operation_id="access_reviews_items_list", method="GET", path="/access-reviews/{id}/items", path_params=("id",), scope="governance:read", danger="read", approval=True, body=False, pagination="cursor"), - "access_reviews.list": OperationSpec(action="access_reviews.list", operation_id="access_reviews_list", method="GET", path="/access-reviews", path_params=(), scope="governance:read", danger="read", approval=True, body=False, pagination="cursor"), - "action_approvals.get": OperationSpec(action=None, operation_id=None, method="GET", path="/action-approvals/{id}", path_params=("id",), scope=None, danger=None, approval=False, body=False, pagination=None), - "api_keys.list": OperationSpec(action="api_keys.list", operation_id="api_keys_list", method="GET", path="/organizations/{organization_id}/api-keys", path_params=("organization_id",), scope="api_keys:read", danger="read", approval=True, body=False, pagination="cursor"), - "api_keys.revoke": OperationSpec(action="api_keys.revoke", operation_id="api_keys_revoke", method="DELETE", path="/api-keys/{id}", path_params=("id",), scope="api_keys:write", danger="destructive", approval=True, body=False, pagination=None), - "apis.create": OperationSpec(action="apis.create", operation_id=None, method="POST", path="/apis", path_params=(), scope="apis:write", danger="write", approval=True, body=True, pagination=None), - "apis.delete": OperationSpec(action="apis.delete", operation_id=None, method="DELETE", path="/apis/{id}", path_params=("id",), scope="apis:write", danger="destructive", approval=True, body=False, pagination=None), - "apis.get": OperationSpec(action="apis.get", operation_id=None, method="GET", path="/apis/{id}", path_params=("id",), scope="apis:read", danger="read", approval=True, body=False, pagination=None), - "apis.list": OperationSpec(action="apis.list", operation_id=None, method="GET", path="/apis", path_params=(), scope="apis:read", danger="read", approval=True, body=False, pagination="cursor"), - "apis.scopes.define": OperationSpec(action="apis.scopes.define", operation_id="apis_scopes_define", method="PUT", path="/apis/{id}/scopes/{key}", path_params=("id", "key"), scope="apis:write", danger="write", approval=True, body=True, pagination=None), - "apis.scopes.remove": OperationSpec(action="apis.scopes.remove", operation_id="apis_scopes_remove", method="DELETE", path="/apis/{id}/scopes/{key}", path_params=("id", "key"), scope="apis:write", danger="destructive", approval=True, body=False, pagination=None), - "apis.update": OperationSpec(action="apis.update", operation_id=None, method="PATCH", path="/apis/{id}", path_params=("id",), scope="apis:write", danger="write", approval=True, body=True, pagination=None), - "app_catalog.delete": OperationSpec(action="app_catalog.delete", operation_id="app_catalog_delete", method="DELETE", path="/app-catalog/{key}", path_params=("key",), scope="app_catalog:write", danger="destructive", approval=True, body=True, pagination=None), - "app_catalog.list": OperationSpec(action="app_catalog.list", operation_id="app_catalog_list", method="GET", path="/app-catalog", path_params=(), scope="app_catalog:read", danger="read", approval=True, body=False, pagination=None), - "app_catalog.save": OperationSpec(action="app_catalog.save", operation_id="app_catalog_save", method="PUT", path="/app-catalog/{key}", path_params=("key",), scope="app_catalog:write", danger="write", approval=True, body=True, pagination=None), - "app_catalog.show": OperationSpec(action="app_catalog.show", operation_id="app_catalog_show", method="GET", path="/app-catalog/{key}", path_params=("key",), scope="app_catalog:read", danger="read", approval=True, body=False, pagination=None), - "approvals.deny": OperationSpec(action="approvals.deny", operation_id="approvals_deny", method="POST", path="/agent-requests/{request_id}/deny", path_params=("request_id",), scope="approvals:write", danger="destructive", approval=True, body=False, pagination=None), - "approvals.list": OperationSpec(action="approvals.list", operation_id="approvals_list", method="GET", path="/agent-requests", path_params=(), scope="approvals:read", danger="read", approval=True, body=False, pagination="cursor"), - "apps.blueprint": OperationSpec(action="apps.blueprint", operation_id="apps_blueprint", method="GET", path="/apps/{id}/blueprint", path_params=("id",), scope="apps:read", danger="read", approval=True, body=False, pagination=None), - "apps.copy": OperationSpec(action="apps.copy", operation_id="apps_copy", method="POST", path="/apps/{id}/copy", path_params=("id",), scope="apps:write", danger="critical", approval=True, body=True, pagination=None), - "apps.create": OperationSpec(action="apps.create", operation_id="apps_create", method="POST", path="/apps", path_params=(), scope="apps:write", danger="critical", approval=True, body=True, pagination=None), - "apps.delete": OperationSpec(action="apps.delete", operation_id="apps_delete", method="DELETE", path="/apps/{id}", path_params=("id",), scope="apps:write", danger="critical", approval=True, body=False, pagination=None), - "apps.get": OperationSpec(action="apps.get", operation_id="apps_get", method="GET", path="/apps/{id}", path_params=("id",), scope="apps:read", danger="read", approval=True, body=False, pagination=None), - "apps.list": OperationSpec(action="apps.list", operation_id="apps_list", method="GET", path="/apps", path_params=(), scope="apps:read", danger="read", approval=True, body=False, pagination="cursor"), - "apps.manifest.set": OperationSpec(action="apps.manifest.set", operation_id="apps_manifest_set", method="PUT", path="/apps/{id}/manifest", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None), - "apps.manifest.sync": OperationSpec(action="apps.manifest.sync", operation_id="apps_manifest_sync", method="POST", path="/apps/{id}/manifest/sync", path_params=("id",), scope="apps:write", danger="write", approval=True, body=False, pagination=None), - "apps.scopes.set": OperationSpec(action="apps.scopes.set", operation_id="apps_scopes_set", method="PUT", path="/apps/{id}/scopes", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None), - "apps.secrets.list": OperationSpec(action="apps.secrets.list", operation_id="apps_secrets_list", method="GET", path="/apps/{id}/secrets", path_params=("id",), scope="apps:read", danger="read", approval=True, body=False, pagination=None), - "apps.secrets.revoke": OperationSpec(action="apps.secrets.revoke", operation_id="apps_secrets_revoke", method="DELETE", path="/apps/{id}/secrets/{secret_id}", path_params=("id", "secret_id"), scope="apps:write", danger="critical", approval=True, body=False, pagination=None), - "apps.secrets.rotate": OperationSpec(action="apps.secrets.rotate", operation_id="apps_secrets_rotate", method="POST", path="/apps/{id}/secrets", path_params=("id",), scope="apps:write", danger="critical", approval=True, body=True, pagination=None), - "apps.settings.api_key_prefix": OperationSpec(action="apps.settings.api_key_prefix", operation_id="apps_settings_api_key_prefix", method="PUT", path="/apps/{id}/settings/api-key-prefix", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None), - "apps.settings.backchannel_logout": OperationSpec(action="apps.settings.backchannel_logout", operation_id="apps_settings_backchannel_logout", method="PUT", path="/apps/{id}/settings/backchannel-logout", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None), - "apps.settings.client_credentials": OperationSpec(action="apps.settings.client_credentials", operation_id="apps_settings_client_credentials", method="PUT", path="/apps/{id}/settings/client-credentials", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None), - "apps.settings.token_exchange": OperationSpec(action="apps.settings.token_exchange", operation_id="apps_settings_token_exchange", method="PUT", path="/apps/{id}/settings/token-exchange", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None), - "apps.settings.token_lifetime": OperationSpec(action="apps.settings.token_lifetime", operation_id="apps_settings_token_lifetime", method="PUT", path="/apps/{id}/settings/token-lifetime", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None), - "apps.update": OperationSpec(action="apps.update", operation_id="apps_update", method="PATCH", path="/apps/{id}", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None), - "audit.list": OperationSpec(action="audit.list", operation_id="audit_list", method="GET", path="/audit-log", path_params=(), scope="audit:read", danger="read", approval=True, body=False, pagination="cursor"), - "audit_logs.events.create": OperationSpec(action="audit_logs.events.create", operation_id="audit_logs_events_create", method="POST", path="/audit-logs/events", path_params=(), scope="audit_logs:write", danger="write", approval=True, body=True, pagination=None), - "audit_logs.events.list": OperationSpec(action="audit_logs.events.list", operation_id="audit_logs_events_list", method="GET", path="/audit-logs/events", path_params=(), scope="audit_logs:read", danger="read", approval=True, body=False, pagination="cursor"), - "audit_logs.exports.create": OperationSpec(action="audit_logs.exports.create", operation_id="audit_logs_exports_create", method="POST", path="/audit-logs/exports", path_params=(), scope="audit_logs:export", danger="write", approval=True, body=True, pagination=None), - "audit_logs.exports.get": OperationSpec(action="audit_logs.exports.get", operation_id="audit_logs_exports_get", method="GET", path="/audit-logs/exports/{id}", path_params=("id",), scope="audit_logs:read", danger="read", approval=True, body=False, pagination=None), - "audit_logs.schemas.create": OperationSpec(action="audit_logs.schemas.create", operation_id="audit_logs_schemas_create", method="POST", path="/audit-logs/schemas", path_params=(), scope="audit_logs:manage", danger="write", approval=True, body=True, pagination=None), - "audit_logs.schemas.delete": OperationSpec(action="audit_logs.schemas.delete", operation_id="audit_logs_schemas_delete", method="DELETE", path="/audit-logs/schemas/{action}", path_params=("action",), scope="audit_logs:manage", danger="destructive", approval=True, body=False, pagination=None), - "audit_logs.schemas.get": OperationSpec(action="audit_logs.schemas.get", operation_id="audit_logs_schemas_get", method="GET", path="/audit-logs/schemas/{action}", path_params=("action",), scope="audit_logs:read", danger="read", approval=True, body=False, pagination=None), - "audit_logs.schemas.list": OperationSpec(action="audit_logs.schemas.list", operation_id="audit_logs_schemas_list", method="GET", path="/audit-logs/schemas", path_params=(), scope="audit_logs:read", danger="read", approval=True, body=False, pagination="cursor"), - "audit_logs.schemas.update": OperationSpec(action="audit_logs.schemas.update", operation_id="audit_logs_schemas_update", method="PUT", path="/audit-logs/schemas/{action}", path_params=("action",), scope="audit_logs:manage", danger="write", approval=True, body=True, pagination=None), - "audit_logs.settings.get": OperationSpec(action="audit_logs.settings.get", operation_id="audit_logs_settings_get", method="GET", path="/audit-logs/settings", path_params=(), scope="audit_logs:read", danger="read", approval=True, body=False, pagination=None), - "audit_logs.settings.update": OperationSpec(action="audit_logs.settings.update", operation_id="audit_logs_settings_update", method="PATCH", path="/audit-logs/settings", path_params=(), scope="audit_logs:manage", danger="destructive", approval=True, body=True, pagination=None), - "audit_logs.verify": OperationSpec(action="audit_logs.verify", operation_id="audit_logs_verify", method="GET", path="/audit-logs/verify", path_params=(), scope="audit_logs:read", danger="read", approval=True, body=False, pagination=None), - "authenticator.me.list": OperationSpec(action=None, operation_id="authenticatorIdentity", method="GET", path="/authenticator/me", path_params=(), scope=None, danger=None, approval=False, body=False, pagination=None), - "branding.appearance.get": OperationSpec(action="branding.appearance.get", operation_id="branding_appearance_get", method="GET", path="/branding/appearance", path_params=(), scope="branding:read", danger="read", approval=True, body=False, pagination=None), - "branding.appearance.set": OperationSpec(action="branding.appearance.set", operation_id="branding_appearance_set", method="PUT", path="/branding/appearance", path_params=(), scope="branding:write", danger="write", approval=True, body=True, pagination=None), - "branding.whitelabel.get": OperationSpec(action="branding.whitelabel.get", operation_id="branding_whitelabel_get", method="GET", path="/branding/whitelabel", path_params=(), scope="branding:read", danger="read", approval=True, body=False, pagination=None), - "branding.whitelabel.set": OperationSpec(action="branding.whitelabel.set", operation_id="branding_whitelabel_set", method="PUT", path="/branding/whitelabel", path_params=(), scope="branding:write", danger="write", approval=True, body=True, pagination=None), - "directories.connect": OperationSpec(action="directories.connect", operation_id="directories_connect", method="POST", path="/directories/connect", path_params=(), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None), - "directories.create": OperationSpec(action="directories.create", operation_id="directories_create", method="POST", path="/directories", path_params=(), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None), - "directories.credentials.replace": OperationSpec(action="directories.credentials.replace", operation_id="directories_credentials_replace", method="PUT", path="/directories/{id}/credentials", path_params=("id",), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None), - "directories.delete": OperationSpec(action="directories.delete", operation_id="directories_delete", method="DELETE", path="/directories/{id}", path_params=("id",), scope="directory_sync:write", danger="destructive", approval=True, body=True, pagination=None), - "directories.get": OperationSpec(action="directories.get", operation_id="directories_get", method="GET", path="/directories/{id}", path_params=("id",), scope="directory_sync:read", danger="read", approval=True, body=False, pagination=None), - "directories.groups.list": OperationSpec(action="directories.groups.list", operation_id="directories_groups_list", method="GET", path="/directories/{id}/groups", path_params=("id",), scope="directory_sync:read", danger="read", approval=True, body=False, pagination="cursor"), - "directories.groups.map": OperationSpec(action="directories.groups.map", operation_id="directories_groups_map", method="POST", path="/directories/{id}/group-roles", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None), - "directories.hris.connect": OperationSpec(action="directories.hris.connect", operation_id="directories_hris_connect", method="POST", path="/directories/hris", path_params=(), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None), - "directories.list": OperationSpec(action="directories.list", operation_id="directories_list", method="GET", path="/directories", path_params=(), scope="directory_sync:read", danger="read", approval=True, body=False, pagination="cursor"), - "directories.status.set": OperationSpec(action="directories.status.set", operation_id="directories_status_set", method="POST", path="/directories/{id}/status", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None), - "directories.sync": OperationSpec(action="directories.sync", operation_id="directories_sync", method="POST", path="/directories/{id}/sync", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None), - "directories.sync_settings.update": OperationSpec(action="directories.sync_settings.update", operation_id="directories_sync_settings_update", method="PATCH", path="/directories/{id}/sync-settings", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None), - "directories.token.rotate": OperationSpec(action="directories.token.rotate", operation_id="directories_token_rotate", method="POST", path="/directories/{id}/rotate", path_params=("id",), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None), - "directories.update": OperationSpec(action="directories.update", operation_id="directories_update", method="PATCH", path="/directories/{id}", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None), - "domains.add": OperationSpec(action="domains.add", operation_id="domains_add", method="POST", path="/domains", path_params=(), scope="domains:write", danger="write", approval=True, body=True, pagination=None), - "domains.get": OperationSpec(action="domains.get", operation_id="domains_get", method="GET", path="/domains", path_params=(), scope="domains:read", danger="read", approval=True, body=False, pagination=None), - "domains.remove": OperationSpec(action="domains.remove", operation_id="domains_remove", method="DELETE", path="/domains", path_params=(), scope="domains:write", danger="destructive", approval=True, body=False, pagination=None), - "domains.verify": OperationSpec(action="domains.verify", operation_id="domains_verify", method="POST", path="/domains/verify", path_params=(), scope="domains:write", danger="write", approval=True, body=False, pagination=None), - "events.list": OperationSpec(action="events.list", operation_id="events_list", method="GET", path="/events", path_params=(), scope="events:read", danger="read", approval=True, body=False, pagination="cursor"), - "feature_flags.create": OperationSpec(action="feature_flags.create", operation_id="feature_flags_create", method="POST", path="/feature-flags", path_params=(), scope="feature_flags:write", danger="write", approval=True, body=True, pagination=None), - "feature_flags.delete": OperationSpec(action="feature_flags.delete", operation_id="feature_flags_delete", method="DELETE", path="/feature-flags/{id}", path_params=("id",), scope="feature_flags:write", danger="destructive", approval=True, body=False, pagination=None), - "feature_flags.evaluate": OperationSpec(action="feature_flags.evaluate", operation_id="feature_flags_evaluate", method="GET", path="/feature-flags/evaluate", path_params=(), scope="feature_flags:read", danger="read", approval=True, body=False, pagination=None), - "feature_flags.get": OperationSpec(action="feature_flags.get", operation_id="feature_flags_get", method="GET", path="/feature-flags/{id}", path_params=("id",), scope="feature_flags:read", danger="read", approval=True, body=False, pagination=None), - "feature_flags.list": OperationSpec(action="feature_flags.list", operation_id="feature_flags_list", method="GET", path="/feature-flags", path_params=(), scope="feature_flags:read", danger="read", approval=True, body=False, pagination="cursor"), - "feature_flags.update": OperationSpec(action="feature_flags.update", operation_id="feature_flags_update", method="PATCH", path="/feature-flags/{id}", path_params=("id",), scope="feature_flags:write", danger="write", approval=True, body=True, pagination=None), - "fga.check": OperationSpec(action="fga.check", operation_id="fga_check", method="GET", path="/fga/check", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination=None), - "fga.check_batch": OperationSpec(action="fga.check_batch", operation_id="fga_check_batch", method="GET", path="/fga/check/batch", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination=None), - "fga.resources.list": OperationSpec(action="fga.resources.list", operation_id="fga_resources_list", method="GET", path="/fga/resources", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination="cursor"), - "fga.schema.get": OperationSpec(action="fga.schema.get", operation_id="fga_schema_get", method="GET", path="/fga/schema", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination=None), - "fga.schema.update": OperationSpec(action="fga.schema.update", operation_id="fga_schema_update", method="PUT", path="/fga/schema", path_params=(), scope="fga:schema", danger="critical", approval=True, body=True, pagination=None), - "fga.schema.validate": OperationSpec(action="fga.schema.validate", operation_id="fga_schema_validate", method="GET", path="/fga/schema/validate", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination=None), - "fga.subjects.list": OperationSpec(action="fga.subjects.list", operation_id="fga_subjects_list", method="GET", path="/fga/subjects", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination="cursor"), - "fga.tuples.delete": OperationSpec(action="fga.tuples.delete", operation_id="fga_tuples_delete", method="POST", path="/fga/tuples/delete", path_params=(), scope="fga:write", danger="destructive", approval=True, body=True, pagination=None), - "fga.tuples.list": OperationSpec(action="fga.tuples.list", operation_id="fga_tuples_list", method="GET", path="/fga/tuples", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination="cursor"), - "fga.tuples.write": OperationSpec(action="fga.tuples.write", operation_id="fga_tuples_write", method="POST", path="/fga/tuples", path_params=(), scope="fga:write", danger="write", approval=True, body=True, pagination=None), - "frontend_keys.create": OperationSpec(action="frontend_keys.create", operation_id="frontend_keys_create", method="POST", path="/frontend-keys", path_params=(), scope="frontend_keys:write", danger="write", approval=True, body=True, pagination=None), - "frontend_keys.list": OperationSpec(action="frontend_keys.list", operation_id="frontend_keys_list", method="GET", path="/frontend-keys", path_params=(), scope="frontend_keys:read", danger="read", approval=True, body=False, pagination="cursor"), - "frontend_keys.revoke": OperationSpec(action="frontend_keys.revoke", operation_id="frontend_keys_revoke", method="DELETE", path="/frontend-keys/{id}", path_params=("id",), scope="frontend_keys:write", danger="destructive", approval=True, body=False, pagination=None), - "frontend_keys.set_origins": OperationSpec(action="frontend_keys.set_origins", operation_id="frontend_keys_set_origins", method="PUT", path="/frontend-keys/{id}/origins", path_params=("id",), scope="frontend_keys:write", danger="write", approval=True, body=True, pagination=None), - "hooks.create": OperationSpec(action="hooks.create", operation_id="hooks_create", method="POST", path="/hooks", path_params=(), scope="hooks:write", danger="critical", approval=True, body=True, pagination=None), - "hooks.delete": OperationSpec(action="hooks.delete", operation_id="hooks_delete", method="DELETE", path="/hooks/{id}", path_params=("id",), scope="hooks:write", danger="destructive", approval=True, body=False, pagination=None), - "hooks.get": OperationSpec(action="hooks.get", operation_id="hooks_get", method="GET", path="/hooks/{id}", path_params=("id",), scope="hooks:read", danger="read", approval=True, body=False, pagination=None), - "hooks.list": OperationSpec(action="hooks.list", operation_id="hooks_list", method="GET", path="/hooks", path_params=(), scope="hooks:read", danger="read", approval=True, body=False, pagination="cursor"), - "hooks.update": OperationSpec(action="hooks.update", operation_id="hooks_update", method="PATCH", path="/hooks/{id}", path_params=("id",), scope="hooks:write", danger="critical", approval=True, body=True, pagination=None), - "invitations.get": OperationSpec(action="invitations.get", operation_id="invitations_get", method="GET", path="/organizations/{organization_id}/invitations/{invitation_id}", path_params=("organization_id", "invitation_id"), scope="invitations:read", danger="read", approval=True, body=False, pagination=None), - "invitations.list": OperationSpec(action="invitations.list", operation_id="invitations_list", method="GET", path="/organizations/{organization_id}/invitations", path_params=("organization_id",), scope="invitations:read", danger="read", approval=True, body=False, pagination="cursor"), - "invitations.resend": OperationSpec(action="invitations.resend", operation_id="invitations_resend", method="POST", path="/organizations/{organization_id}/invitations/{invitation_id}/resend", path_params=("organization_id", "invitation_id"), scope="invitations:write", danger="write", approval=True, body=False, pagination=None), - "invitations.revoke": OperationSpec(action="invitations.revoke", operation_id="invitations_revoke", method="DELETE", path="/organizations/{organization_id}/invitations/{invitation_id}", path_params=("organization_id", "invitation_id"), scope="invitations:write", danger="destructive", approval=True, body=False, pagination=None), - "invitations.send": OperationSpec(action="invitations.send", operation_id="invitations_send", method="POST", path="/organizations/{organization_id}/invitations", path_params=("organization_id",), scope="invitations:write", danger="write", approval=True, body=True, pagination=None), - "keys.create": OperationSpec(action="keys.create", operation_id="keys_create", method="POST", path="/keys", path_params=(), scope="keys:write", danger="critical", approval=True, body=True, pagination=None), - "keys.list": OperationSpec(action="keys.list", operation_id="keys_list", method="GET", path="/keys", path_params=(), scope="keys:read", danger="read", approval=True, body=False, pagination="cursor"), - "keys.revoke": OperationSpec(action="keys.revoke", operation_id="keys_revoke", method="DELETE", path="/keys/{id}", path_params=("id",), scope="keys:write", danger="destructive", approval=True, body=False, pagination=None), - "keys.rotate": OperationSpec(action="keys.rotate", operation_id="keys_rotate", method="POST", path="/keys/{id}/rotate", path_params=("id",), scope="keys:write", danger="critical", approval=True, body=True, pagination=None), - "legacy_login.approve": OperationSpec(action="legacy_login.approve", operation_id="legacy_login_approve", method="POST", path="/legacy-login/approve", path_params=(), scope="signin:write", danger="critical", approval=True, body=False, pagination=None), - "legacy_login.get": OperationSpec(action="legacy_login.get", operation_id="legacy_login_get", method="GET", path="/legacy-login", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination=None), - "legacy_login.probe": OperationSpec(action="legacy_login.probe", operation_id="legacy_login_probe", method="POST", path="/legacy-login/probe", path_params=(), scope="signin:write", danger="write", approval=True, body=True, pagination=None), - "legacy_login.revoke": OperationSpec(action="legacy_login.revoke", operation_id="legacy_login_revoke", method="POST", path="/legacy-login/revoke", path_params=(), scope="signin:write", danger="critical", approval=True, body=False, pagination=None), - "log_streams.create": OperationSpec(action="log_streams.create", operation_id="log_streams_create", method="POST", path="/log-streams", path_params=(), scope="log_streams:write", danger="critical", approval=True, body=True, pagination=None), - "log_streams.delete": OperationSpec(action="log_streams.delete", operation_id="log_streams_delete", method="DELETE", path="/log-streams/{id}", path_params=("id",), scope="log_streams:write", danger="destructive", approval=True, body=False, pagination=None), - "log_streams.get": OperationSpec(action="log_streams.get", operation_id="log_streams_get", method="GET", path="/log-streams/{id}", path_params=("id",), scope="log_streams:read", danger="read", approval=True, body=False, pagination=None), - "log_streams.list": OperationSpec(action="log_streams.list", operation_id="log_streams_list", method="GET", path="/log-streams", path_params=(), scope="log_streams:read", danger="read", approval=True, body=False, pagination="cursor"), - "log_streams.test": OperationSpec(action="log_streams.test", operation_id="log_streams_test", method="POST", path="/log-streams/{id}/test", path_params=("id",), scope="log_streams:write", danger="write", approval=True, body=False, pagination=None), - "log_streams.update": OperationSpec(action="log_streams.update", operation_id="log_streams_update", method="PATCH", path="/log-streams/{id}", path_params=("id",), scope="log_streams:write", danger="critical", approval=True, body=True, pagination=None), - "members.add": OperationSpec(action="members.add", operation_id="members_add", method="POST", path="/organizations/{organization_id}/members", path_params=("organization_id",), scope="members:write", danger="write", approval=True, body=True, pagination=None), - "members.apps.roles.replace": OperationSpec(action="members.apps.roles.replace", operation_id="members_apps_roles_replace", method="PUT", path="/organizations/{organization_id}/members/{user_id}/apps/{client_id}/roles", path_params=("organization_id", "user_id", "client_id"), scope="roles:write", danger="write", approval=True, body=True, pagination=None), - "members.list": OperationSpec(action="members.list", operation_id="members_list", method="GET", path="/organizations/{organization_id}/members", path_params=("organization_id",), scope="members:read", danger="read", approval=True, body=False, pagination="cursor"), - "members.remove": OperationSpec(action="members.remove", operation_id="members_remove", method="DELETE", path="/organizations/{organization_id}/members/{user_id}", path_params=("organization_id", "user_id"), scope="members:write", danger="destructive", approval=True, body=False, pagination=None), - "members.roles.grant": OperationSpec(action="members.roles.grant", operation_id="members_roles_grant", method="PUT", path="/organizations/{organization_id}/members/{user_id}/roles/{role_id}", path_params=("organization_id", "user_id", "role_id"), scope="roles:write", danger="write", approval=True, body=False, pagination=None), - "members.roles.list": OperationSpec(action="members.roles.list", operation_id="members_roles_list", method="GET", path="/organizations/{organization_id}/members/{user_id}/roles", path_params=("organization_id", "user_id"), scope="roles:read", danger="read", approval=True, body=False, pagination=None), - "members.roles.revoke": OperationSpec(action="members.roles.revoke", operation_id="members_roles_revoke", method="DELETE", path="/organizations/{organization_id}/members/{user_id}/roles/{role_id}", path_params=("organization_id", "user_id", "role_id"), scope="roles:write", danger="destructive", approval=True, body=False, pagination=None), - "members.update": OperationSpec(action="members.update", operation_id="members_update", method="PATCH", path="/organizations/{organization_id}/members/{user_id}", path_params=("organization_id", "user_id"), scope="members:write", danger="write", approval=True, body=True, pagination=None), - "organizations.create": OperationSpec(action="organizations.create", operation_id="organizations_create", method="POST", path="/organizations", path_params=(), scope="organizations:write", danger="write", approval=True, body=True, pagination=None), - "organizations.delete": OperationSpec(action="organizations.delete", operation_id="organizations_delete", method="DELETE", path="/organizations/{id}", path_params=("id",), scope="organizations:write", danger="destructive", approval=True, body=False, pagination=None), - "organizations.domains.add": OperationSpec(action="organizations.domains.add", operation_id="organizations_domains_add", method="POST", path="/organizations/{organization_id}/domains", path_params=("organization_id",), scope="organizations:write", danger="write", approval=True, body=True, pagination=None), - "organizations.domains.capture": OperationSpec(action="organizations.domains.capture", operation_id="organizations_domains_capture", method="PUT", path="/organizations/{organization_id}/domains/{domain_id}/capture", path_params=("organization_id", "domain_id"), scope="organizations:write", danger="critical", approval=True, body=True, pagination=None), - "organizations.domains.list": OperationSpec(action="organizations.domains.list", operation_id="organizations_domains_list", method="GET", path="/organizations/{organization_id}/domains", path_params=("organization_id",), scope="organizations:read", danger="read", approval=True, body=False, pagination=None), - "organizations.domains.remove": OperationSpec(action="organizations.domains.remove", operation_id="organizations_domains_remove", method="DELETE", path="/organizations/{organization_id}/domains/{domain_id}", path_params=("organization_id", "domain_id"), scope="organizations:write", danger="destructive", approval=True, body=False, pagination=None), - "organizations.domains.verify": OperationSpec(action="organizations.domains.verify", operation_id="organizations_domains_verify", method="POST", path="/organizations/{organization_id}/domains/{domain_id}/verify", path_params=("organization_id", "domain_id"), scope="organizations:write", danger="write", approval=True, body=False, pagination=None), - "organizations.get": OperationSpec(action="organizations.get", operation_id="organizations_get", method="GET", path="/organizations/{id}", path_params=("id",), scope="organizations:read", danger="read", approval=True, body=False, pagination=None), - "organizations.list": OperationSpec(action="organizations.list", operation_id="organizations_list", method="GET", path="/organizations", path_params=(), scope="organizations:read", danger="read", approval=True, body=False, pagination="cursor"), - "organizations.portal_links.create": OperationSpec(action="organizations.portal_links.create", operation_id="organizations_portal_links_create", method="POST", path="/organizations/{organization_id}/portal-links", path_params=("organization_id",), scope="portal_links:write", danger="critical", approval=True, body=True, pagination=None), - "organizations.portal_links.list": OperationSpec(action="organizations.portal_links.list", operation_id="organizations_portal_links_list", method="GET", path="/organizations/{organization_id}/portal-links", path_params=("organization_id",), scope="portal_links:read", danger="read", approval=True, body=False, pagination=None), - "organizations.portal_links.revoke": OperationSpec(action="organizations.portal_links.revoke", operation_id="organizations_portal_links_revoke", method="DELETE", path="/organizations/{organization_id}/portal-links/{id}", path_params=("organization_id", "id"), scope="portal_links:write", danger="destructive", approval=True, body=False, pagination=None), - "organizations.reactivate": OperationSpec(action="organizations.reactivate", operation_id="organizations_reactivate", method="POST", path="/organizations/{id}/reactivate", path_params=("id",), scope="organizations:write", danger="write", approval=True, body=False, pagination=None), - "organizations.suspend": OperationSpec(action="organizations.suspend", operation_id="organizations_suspend", method="POST", path="/organizations/{id}/suspend", path_params=("id",), scope="organizations:write", danger="write", approval=True, body=False, pagination=None), - "organizations.transfer_ownership": OperationSpec(action="organizations.transfer_ownership", operation_id="organizations_transfer_ownership", method="POST", path="/organizations/{id}/transfer-ownership", path_params=("id",), scope="organizations:write", danger="critical", approval=True, body=True, pagination=None), - "organizations.update": OperationSpec(action="organizations.update", operation_id="organizations_update", method="PATCH", path="/organizations/{id}", path_params=("id",), scope="organizations:write", danger="write", approval=True, body=True, pagination=None), - "permissions.create": OperationSpec(action="permissions.create", operation_id="permissions_create", method="POST", path="/permissions", path_params=(), scope="role_definitions:write", danger="write", approval=True, body=True, pagination=None), - "permissions.delete": OperationSpec(action="permissions.delete", operation_id="permissions_delete", method="DELETE", path="/permissions/{id}", path_params=("id",), scope="role_definitions:write", danger="destructive", approval=True, body=False, pagination=None), - "permissions.list": OperationSpec(action="permissions.list", operation_id="permissions_list", method="GET", path="/permissions", path_params=(), scope="roles:read", danger="read", approval=True, body=False, pagination="cursor"), - "permissions.update": OperationSpec(action="permissions.update", operation_id="permissions_update", method="PATCH", path="/permissions/{id}", path_params=("id",), scope="role_definitions:write", danger="write", approval=True, body=True, pagination=None), - "pipes.connections.delete": OperationSpec(action="pipes.connections.delete", operation_id="pipes_connections_delete", method="DELETE", path="/pipes/{id}/connections/{connection_id}", path_params=("id", "connection_id"), scope="pipes:write", danger="destructive", approval=True, body=False, pagination=None), - "pipes.connections.list": OperationSpec(action="pipes.connections.list", operation_id="pipes_connections_list", method="GET", path="/pipes/{id}/connections", path_params=("id",), scope="pipes:read", danger="read", approval=True, body=False, pagination="cursor"), - "pipes.create": OperationSpec(action="pipes.create", operation_id="pipes_create", method="POST", path="/pipes", path_params=(), scope="pipes:write", danger="write", approval=True, body=True, pagination=None), - "pipes.delete": OperationSpec(action="pipes.delete", operation_id="pipes_delete", method="DELETE", path="/pipes/{id}", path_params=("id",), scope="pipes:write", danger="destructive", approval=True, body=False, pagination=None), - "pipes.get": OperationSpec(action="pipes.get", operation_id="pipes_get", method="GET", path="/pipes/{id}", path_params=("id",), scope="pipes:read", danger="read", approval=True, body=False, pagination=None), - "pipes.grants.create": OperationSpec(action="pipes.grants.create", operation_id="pipes_grants_create", method="POST", path="/pipes/{id}/grants", path_params=("id",), scope="pipes:write", danger="critical", approval=True, body=True, pagination=None), - "pipes.grants.delete": OperationSpec(action="pipes.grants.delete", operation_id="pipes_grants_delete", method="DELETE", path="/pipes/{id}/grants/{client_id}", path_params=("id", "client_id"), scope="pipes:write", danger="destructive", approval=True, body=False, pagination=None), - "pipes.list": OperationSpec(action="pipes.list", operation_id="pipes_list", method="GET", path="/pipes", path_params=(), scope="pipes:read", danger="read", approval=True, body=False, pagination="cursor"), - "pipes.update": OperationSpec(action="pipes.update", operation_id="pipes_update", method="PATCH", path="/pipes/{id}", path_params=("id",), scope="pipes:write", danger="write", approval=True, body=True, pagination=None), - "provisioning.targets.create": OperationSpec(action="provisioning.targets.create", operation_id="provisioning_targets_create", method="POST", path="/provisioning-targets", path_params=(), scope="provisioning:write", danger="critical", approval=True, body=True, pagination=None), - "provisioning.targets.delete": OperationSpec(action="provisioning.targets.delete", operation_id="provisioning_targets_delete", method="DELETE", path="/provisioning-targets/{id}", path_params=("id",), scope="provisioning:write", danger="destructive", approval=True, body=True, pagination=None), - "provisioning.targets.get": OperationSpec(action="provisioning.targets.get", operation_id="provisioning_targets_get", method="GET", path="/provisioning-targets/{id}", path_params=("id",), scope="provisioning:read", danger="read", approval=True, body=False, pagination=None), - "provisioning.targets.list": OperationSpec(action="provisioning.targets.list", operation_id="provisioning_targets_list", method="GET", path="/provisioning-targets", path_params=(), scope="provisioning:read", danger="read", approval=True, body=False, pagination="cursor"), - "provisioning.targets.status.set": OperationSpec(action="provisioning.targets.status.set", operation_id="provisioning_targets_status_set", method="POST", path="/provisioning-targets/{id}/status", path_params=("id",), scope="provisioning:write", danger="write", approval=True, body=True, pagination=None), - "radar.decisions.get": OperationSpec(action="radar.decisions.get", operation_id="radar_decisions_get", method="GET", path="/radar/decisions/{id}", path_params=("id",), scope="radar:read", danger="read", approval=True, body=False, pagination=None), - "radar.decisions.list": OperationSpec(action="radar.decisions.list", operation_id="radar_decisions_list", method="GET", path="/radar/decisions", path_params=(), scope="radar:read", danger="read", approval=True, body=False, pagination="cursor"), - "radar.lists.add": OperationSpec(action="radar.lists.add", operation_id="radar_lists_add", method="POST", path="/radar/lists", path_params=(), scope="radar:write", danger="write", approval=True, body=True, pagination=None), - "radar.lists.list": OperationSpec(action="radar.lists.list", operation_id="radar_lists_list", method="GET", path="/radar/lists", path_params=(), scope="radar:read", danger="read", approval=True, body=False, pagination="cursor"), - "radar.lists.remove": OperationSpec(action="radar.lists.remove", operation_id="radar_lists_remove", method="DELETE", path="/radar/lists/{id}", path_params=("id",), scope="radar:write", danger="destructive", approval=True, body=False, pagination=None), - "radar.mode.set": OperationSpec(action="radar.mode.set", operation_id="radar_mode_set", method="PUT", path="/radar/mode", path_params=(), scope="radar:manage", danger="critical", approval=True, body=True, pagination=None), - "radar.rules.create": OperationSpec(action="radar.rules.create", operation_id="radar_rules_create", method="POST", path="/radar/rules", path_params=(), scope="radar:write", danger="write", approval=True, body=True, pagination=None), - "radar.rules.delete": OperationSpec(action="radar.rules.delete", operation_id="radar_rules_delete", method="DELETE", path="/radar/rules/{id}", path_params=("id",), scope="radar:write", danger="destructive", approval=True, body=False, pagination=None), - "radar.rules.get": OperationSpec(action="radar.rules.get", operation_id="radar_rules_get", method="GET", path="/radar/rules/{id}", path_params=("id",), scope="radar:read", danger="read", approval=True, body=False, pagination=None), - "radar.rules.list": OperationSpec(action="radar.rules.list", operation_id="radar_rules_list", method="GET", path="/radar/rules", path_params=(), scope="radar:read", danger="read", approval=True, body=False, pagination="cursor"), - "radar.rules.reorder": OperationSpec(action="radar.rules.reorder", operation_id="radar_rules_reorder", method="PUT", path="/radar/rules/order", path_params=(), scope="radar:write", danger="write", approval=True, body=True, pagination=None), - "radar.rules.update": OperationSpec(action="radar.rules.update", operation_id="radar_rules_update", method="PATCH", path="/radar/rules/{id}", path_params=("id",), scope="radar:write", danger="write", approval=True, body=True, pagination=None), - "radar.settings.get": OperationSpec(action="radar.settings.get", operation_id="radar_settings_get", method="GET", path="/radar/settings", path_params=(), scope="radar:read", danger="read", approval=True, body=False, pagination=None), - "radar.settings.update": OperationSpec(action="radar.settings.update", operation_id="radar_settings_update", method="PATCH", path="/radar/settings", path_params=(), scope="radar:write", danger="write", approval=True, body=True, pagination=None), - "roles.create": OperationSpec(action="roles.create", operation_id="roles_create", method="POST", path="/roles", path_params=(), scope="role_definitions:write", danger="write", approval=True, body=True, pagination=None), - "roles.definition.activate": OperationSpec(action="roles.definition.activate", operation_id="roles_definition_activate", method="POST", path="/roles/{id}/definition/activate", path_params=("id",), scope="role_definitions:write", danger="destructive", approval=True, body=True, pagination=None), - "roles.delete": OperationSpec(action="roles.delete", operation_id="roles_delete", method="DELETE", path="/roles/{id}", path_params=("id",), scope="role_definitions:write", danger="destructive", approval=True, body=False, pagination=None), - "roles.get": OperationSpec(action="roles.get", operation_id="roles_get", method="GET", path="/roles/{id}", path_params=("id",), scope="roles:read", danger="read", approval=True, body=False, pagination=None), - "roles.list": OperationSpec(action="roles.list", operation_id="roles_list", method="GET", path="/roles", path_params=(), scope="roles:read", danger="read", approval=True, body=False, pagination=None), - "roles.permissions.grant": OperationSpec(action="roles.permissions.grant", operation_id="roles_permissions_grant", method="PUT", path="/roles/{id}/permissions/{permission_id}", path_params=("id", "permission_id"), scope="role_definitions:write", danger="write", approval=True, body=False, pagination=None), - "roles.permissions.revoke": OperationSpec(action="roles.permissions.revoke", operation_id="roles_permissions_revoke", method="DELETE", path="/roles/{id}/permissions/{permission_id}", path_params=("id", "permission_id"), scope="role_definitions:write", danger="destructive", approval=True, body=False, pagination=None), - "roles.update": OperationSpec(action="roles.update", operation_id="roles_update", method="PATCH", path="/roles/{id}", path_params=("id",), scope="role_definitions:write", danger="write", approval=True, body=True, pagination=None), - "saml_apps.create": OperationSpec(action="saml_apps.create", operation_id="saml_apps_create", method="POST", path="/saml-apps", path_params=(), scope="saml_apps:write", danger="critical", approval=True, body=True, pagination=None), - "saml_apps.delete": OperationSpec(action="saml_apps.delete", operation_id="saml_apps_delete", method="DELETE", path="/saml-apps/{id}", path_params=("id",), scope="saml_apps:write", danger="critical", approval=True, body=False, pagination=None), - "saml_apps.get": OperationSpec(action="saml_apps.get", operation_id="saml_apps_get", method="GET", path="/saml-apps/{id}", path_params=("id",), scope="saml_apps:read", danger="read", approval=True, body=False, pagination=None), - "saml_apps.list": OperationSpec(action="saml_apps.list", operation_id="saml_apps_list", method="GET", path="/saml-apps", path_params=(), scope="saml_apps:read", danger="read", approval=True, body=False, pagination="cursor"), - "saml_apps.update": OperationSpec(action="saml_apps.update", operation_id="saml_apps_update", method="PATCH", path="/saml-apps/{id}", path_params=("id",), scope="saml_apps:write", danger="critical", approval=True, body=True, pagination=None), - "signals.source.erasures.list": OperationSpec(action=None, operation_id="signals_source_erasures", method="GET", path="/signals/source/erasures", path_params=(), scope=None, danger=None, approval=False, body=False, pagination="cursor"), - "signals.source.list": OperationSpec(action=None, operation_id="signals_source_list", method="GET", path="/signals/source", path_params=(), scope=None, danger=None, approval=False, body=False, pagination="cursor"), - "signin.policy.get": OperationSpec(action="signin.policy.get", operation_id="signin_policy_get", method="GET", path="/sign-in/policy", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination=None), - "signin.policy.inherit": OperationSpec(action="signin.policy.inherit", operation_id="signin_policy_inherit", method="DELETE", path="/sign-in/policy/organizations/{organization_id}", path_params=("organization_id",), scope="signin:write", danger="critical", approval=True, body=False, pagination=None), - "signin.policy.update": OperationSpec(action="signin.policy.update", operation_id="signin_policy_update", method="PATCH", path="/sign-in/policy", path_params=(), scope="signin:write", danger="critical", approval=True, body=True, pagination=None), - "signin.self_service_signup.set": OperationSpec(action="signin.self_service_signup.set", operation_id="signin_self_service_signup_set", method="PUT", path="/sign-in/self-service-signup", path_params=(), scope="signin:write", danger="critical", approval=True, body=True, pagination=None), - "signin.sms.get": OperationSpec(action="signin.sms.get", operation_id="signin_sms_get", method="GET", path="/sign-in/sms", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination=None), - "signin.sms.update": OperationSpec(action="signin.sms.update", operation_id="signin_sms_update", method="PATCH", path="/sign-in/sms", path_params=(), scope="signin:write", danger="critical", approval=True, body=True, pagination=None), - "signin.social.delete": OperationSpec(action="signin.social.delete", operation_id="signin_social_delete", method="DELETE", path="/sign-in/social-providers/{id}", path_params=("id",), scope="signin:write", danger="critical", approval=True, body=True, pagination=None), - "signin.social.disable": OperationSpec(action="signin.social.disable", operation_id="signin_social_disable", method="POST", path="/sign-in/social-providers/{id}/disable", path_params=("id",), scope="signin:write", danger="critical", approval=True, body=True, pagination=None), - "signin.social.enable": OperationSpec(action="signin.social.enable", operation_id="signin_social_enable", method="POST", path="/sign-in/social-providers/{id}/enable", path_params=("id",), scope="signin:write", danger="write", approval=True, body=True, pagination=None), - "signin.social.inherit": OperationSpec(action="signin.social.inherit", operation_id="signin_social_inherit", method="PUT", path="/sign-in/social-providers/inherited/{provider}", path_params=("provider",), scope="signin:write", danger="write", approval=True, body=True, pagination=None), - "signin.social.list": OperationSpec(action="signin.social.list", operation_id="signin_social_list", method="GET", path="/sign-in/social-providers", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination="cursor"), - "signin.social.offered": OperationSpec(action="signin.social.offered", operation_id="signin_social_offered", method="GET", path="/sign-in/social-providers/offered", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination=None), - "signin.social.set": OperationSpec(action="signin.social.set", operation_id="signin_social_set", method="POST", path="/sign-in/social-providers", path_params=(), scope="signin:write", danger="critical", approval=True, body=True, pagination=None), - "signin.social.update": OperationSpec(action="signin.social.update", operation_id="signin_social_update", method="PATCH", path="/sign-in/social-providers/{id}", path_params=("id",), scope="signin:write", danger="critical", approval=True, body=True, pagination=None), - "sod_policies.create": OperationSpec(action="sod_policies.create", operation_id="sod_policies_create", method="POST", path="/sod-policies", path_params=(), scope="governance:write", danger="write", approval=True, body=True, pagination=None), - "sod_policies.delete": OperationSpec(action="sod_policies.delete", operation_id="sod_policies_delete", method="DELETE", path="/sod-policies/{id}", path_params=("id",), scope="governance:write", danger="critical", approval=True, body=True, pagination=None), - "sod_policies.get": OperationSpec(action="sod_policies.get", operation_id="sod_policies_get", method="GET", path="/sod-policies/{id}", path_params=("id",), scope="governance:read", danger="read", approval=True, body=False, pagination=None), - "sod_policies.list": OperationSpec(action="sod_policies.list", operation_id="sod_policies_list", method="GET", path="/sod-policies", path_params=(), scope="governance:read", danger="read", approval=True, body=False, pagination="cursor"), - "sod_policies.status.set": OperationSpec(action="sod_policies.status.set", operation_id="sod_policies_status_set", method="POST", path="/sod-policies/{id}/status", path_params=("id",), scope="governance:write", danger="critical", approval=True, body=True, pagination=None), - "sso.connections.activate": OperationSpec(action="sso.connections.activate", operation_id="sso_connections_activate", method="POST", path="/sso/connections/{id}/activate", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None), - "sso.connections.certificates.activate": OperationSpec(action="sso.connections.certificates.activate", operation_id="sso_connections_certificates_activate", method="POST", path="/sso/connections/{id}/certificates/activate", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None), - "sso.connections.certificates.list": OperationSpec(action="sso.connections.certificates.list", operation_id="sso_connections_certificates_list", method="GET", path="/sso/connections/{id}/certificates", path_params=("id",), scope="sso:read", danger="read", approval=True, body=False, pagination=None), - "sso.connections.certificates.stage": OperationSpec(action="sso.connections.certificates.stage", operation_id="sso_connections_certificates_stage", method="POST", path="/sso/connections/{id}/certificates", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None), - "sso.connections.create": OperationSpec(action="sso.connections.create", operation_id="sso_connections_create", method="POST", path="/sso/connections", path_params=(), scope="sso:write", danger="write", approval=True, body=True, pagination=None), - "sso.connections.delete": OperationSpec(action="sso.connections.delete", operation_id="sso_connections_delete", method="DELETE", path="/sso/connections/{id}", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None), - "sso.connections.disable": OperationSpec(action="sso.connections.disable", operation_id="sso_connections_disable", method="POST", path="/sso/connections/{id}/disable", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None), - "sso.connections.get": OperationSpec(action="sso.connections.get", operation_id="sso_connections_get", method="GET", path="/sso/connections/{id}", path_params=("id",), scope="sso:read", danger="read", approval=True, body=False, pagination=None), - "sso.connections.list": OperationSpec(action="sso.connections.list", operation_id="sso_connections_list", method="GET", path="/sso/connections", path_params=(), scope="sso:read", danger="read", approval=True, body=False, pagination="cursor"), - "sso.connections.require_sso": OperationSpec(action="sso.connections.require_sso", operation_id="sso_connections_require_sso", method="POST", path="/sso/connections/{id}/require-sso", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None), - "sso.connections.update": OperationSpec(action="sso.connections.update", operation_id="sso_connections_update", method="PATCH", path="/sso/connections/{id}", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None), - "sso.domains.capture": OperationSpec(action="sso.domains.capture", operation_id="sso_domains_capture", method="POST", path="/sso/domains/{id}/capture", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None), - "sso.domains.create": OperationSpec(action="sso.domains.create", operation_id="sso_domains_create", method="POST", path="/sso/domains", path_params=(), scope="sso:write", danger="write", approval=True, body=True, pagination=None), - "sso.domains.delete": OperationSpec(action="sso.domains.delete", operation_id="sso_domains_delete", method="DELETE", path="/sso/domains/{id}", path_params=("id",), scope="sso:write", danger="destructive", approval=True, body=True, pagination=None), - "sso.domains.list": OperationSpec(action="sso.domains.list", operation_id="sso_domains_list", method="GET", path="/sso/domains", path_params=(), scope="sso:read", danger="read", approval=True, body=False, pagination="cursor"), - "sso.domains.verify": OperationSpec(action="sso.domains.verify", operation_id="sso_domains_verify", method="POST", path="/sso/domains/{id}/verify", path_params=("id",), scope="sso:write", danger="write", approval=True, body=True, pagination=None), - "sso.saml_metadata.import": OperationSpec(action="sso.saml_metadata.import", operation_id="sso_saml_metadata_import", method="POST", path="/sso/saml-metadata", path_params=(), scope="sso:write", danger="write", approval=True, body=True, pagination=None), - "support_sessions.end": OperationSpec(action="support_sessions.end", operation_id="support_sessions_end", method="DELETE", path="/support-sessions/{id}", path_params=("id",), scope="support:write", danger="destructive", approval=True, body=False, pagination=None), - "support_sessions.start": OperationSpec(action="support_sessions.start", operation_id="support_sessions_start", method="POST", path="/support-sessions", path_params=(), scope="support:write", danger="critical", approval=True, body=True, pagination=None), - "token_vault.grants.create": OperationSpec(action="token_vault.grants.create", operation_id="token_vault_grants_create", method="POST", path="/token-vault/secrets/{id}/grants", path_params=("id",), scope="token_vault:write", danger="critical", approval=True, body=True, pagination=None), - "token_vault.grants.delete": OperationSpec(action="token_vault.grants.delete", operation_id="token_vault_grants_delete", method="DELETE", path="/token-vault/secrets/{id}/grants/{client_id}", path_params=("id", "client_id"), scope="token_vault:write", danger="destructive", approval=True, body=True, pagination=None), - "token_vault.secrets.create": OperationSpec(action="token_vault.secrets.create", operation_id="token_vault_secrets_create", method="POST", path="/token-vault/secrets", path_params=(), scope="token_vault:write", danger="write", approval=True, body=True, pagination=None), - "token_vault.secrets.get": OperationSpec(action="token_vault.secrets.get", operation_id="token_vault_secrets_get", method="GET", path="/token-vault/secrets/{id}", path_params=("id",), scope="token_vault:read", danger="read", approval=True, body=False, pagination=None), - "token_vault.secrets.list": OperationSpec(action="token_vault.secrets.list", operation_id="token_vault_secrets_list", method="GET", path="/token-vault/secrets", path_params=(), scope="token_vault:read", danger="read", approval=True, body=False, pagination="cursor"), - "token_vault.secrets.revoke": OperationSpec(action="token_vault.secrets.revoke", operation_id="token_vault_secrets_revoke", method="POST", path="/token-vault/secrets/{id}/revoke", path_params=("id",), scope="token_vault:write", danger="destructive", approval=True, body=True, pagination=None), - "token_vault.secrets.rotate": OperationSpec(action="token_vault.secrets.rotate", operation_id="token_vault_secrets_rotate", method="POST", path="/token-vault/secrets/{id}/rotate", path_params=("id",), scope="token_vault:write", danger="critical", approval=True, body=True, pagination=None), - "user_property_namespaces.configure": OperationSpec(action="user_property_namespaces.configure", operation_id="user_property_namespaces_configure", method="PUT", path="/user-property-namespaces/{name}", path_params=("name",), scope="user_property_namespaces:write", danger="critical", approval=True, body=True, pagination=None), - "user_property_namespaces.show": OperationSpec(action="user_property_namespaces.show", operation_id="user_property_namespaces_show", method="GET", path="/user-property-namespaces/{name}", path_params=("name",), scope="user_property_namespaces:read", danger="read", approval=True, body=False, pagination=None), - "users.create": OperationSpec(action="users.create", operation_id="users_create", method="POST", path="/users", path_params=(), scope="users:write", danger="write", approval=True, body=True, pagination=None), - "users.deactivate": OperationSpec(action="users.deactivate", operation_id="users_deactivate", method="DELETE", path="/users/{id}", path_params=("id",), scope="users:write", danger="destructive", approval=True, body=False, pagination=None), - "users.environment_roles.get": OperationSpec(action="users.environment_roles.get", operation_id="users_environment_roles_get", method="GET", path="/users/{id}/environment-roles/{role_id}", path_params=("id", "role_id"), scope="roles:read", danger="read", approval=True, body=False, pagination=None), - "users.environment_roles.grant": OperationSpec(action="users.environment_roles.grant", operation_id="users_environment_roles_grant", method="PUT", path="/users/{id}/environment-roles/{role_id}", path_params=("id", "role_id"), scope="roles:write", danger="critical", approval=True, body=False, pagination=None), - "users.environment_roles.list": OperationSpec(action="users.environment_roles.list", operation_id="users_environment_roles_list", method="GET", path="/users/{id}/environment-roles", path_params=("id",), scope="roles:read", danger="read", approval=True, body=False, pagination=None), - "users.environment_roles.revoke": OperationSpec(action="users.environment_roles.revoke", operation_id="users_environment_roles_revoke", method="DELETE", path="/users/{id}/environment-roles/{role_id}", path_params=("id", "role_id"), scope="roles:write", danger="destructive", approval=True, body=False, pagination=None), - "users.erase": OperationSpec(action="users.erase", operation_id="users_erase", method="POST", path="/users/{id}/erase", path_params=("id",), scope="users:erase", danger="critical", approval=True, body=False, pagination=None), - "users.get": OperationSpec(action="users.get", operation_id="users_get", method="GET", path="/users/{id}", path_params=("id",), scope="users:read", danger="read", approval=True, body=False, pagination=None), - "users.list": OperationSpec(action="users.list", operation_id="users_list", method="GET", path="/users", path_params=(), scope="users:read", danger="read", approval=True, body=False, pagination="cursor"), - "users.mfa.reset": OperationSpec(action="users.mfa.reset", operation_id="users_mfa_reset", method="DELETE", path="/users/{id}/mfa", path_params=("id",), scope="users:write", danger="critical", approval=True, body=False, pagination=None), - "users.mfa.sms.remove": OperationSpec(action="users.mfa.sms.remove", operation_id="users_mfa_sms_remove", method="DELETE", path="/users/{id}/mfa/sms", path_params=("id",), scope="users:write", danger="critical", approval=True, body=False, pagination=None), - "users.password.set": OperationSpec(action="users.password.set", operation_id="users_password_set", method="POST", path="/users/{id}/password", path_params=("id",), scope="users:write", danger="critical", approval=True, body=True, pagination=None), - "users.password_reset.send": OperationSpec(action="users.password_reset.send", operation_id="users_password_reset_send", method="POST", path="/users/{id}/password-reset", path_params=("id",), scope="users:write", danger="write", approval=True, body=False, pagination=None), - "users.reactivate": OperationSpec(action="users.reactivate", operation_id="users_reactivate", method="POST", path="/users/{id}/reactivate", path_params=("id",), scope="users:write", danger="write", approval=True, body=False, pagination=None), - "users.sessions.list": OperationSpec(action="users.sessions.list", operation_id="users_sessions_list", method="GET", path="/users/{id}/sessions", path_params=("id",), scope="users:read", danger="read", approval=True, body=False, pagination=None), - "users.sessions.revoke": OperationSpec(action="users.sessions.revoke", operation_id="users_sessions_revoke", method="DELETE", path="/users/{id}/sessions/{session_id}", path_params=("id", "session_id"), scope="users:write", danger="destructive", approval=True, body=False, pagination=None), - "users.sessions.revoke_all": OperationSpec(action="users.sessions.revoke_all", operation_id="users_sessions_revoke_all", method="DELETE", path="/users/{id}/sessions", path_params=("id",), scope="users:write", danger="destructive", approval=True, body=False, pagination=None), - "users.update": OperationSpec(action="users.update", operation_id="users_update", method="PATCH", path="/users/{id}", path_params=("id",), scope="users:write", danger="critical", approval=True, body=True, pagination=None), - "users.verification.send": OperationSpec(action="users.verification.send", operation_id="users_verification_send", method="POST", path="/users/{id}/verification", path_params=("id",), scope="users:write", danger="write", approval=True, body=False, pagination=None), - "users.verify": OperationSpec(action="users.verify", operation_id="users_verify", method="POST", path="/users/{id}/verify", path_params=("id",), scope="users:write", danger="critical", approval=True, body=False, pagination=None), - "webhooks.create": OperationSpec(action="webhooks.create", operation_id="webhooks_create", method="POST", path="/webhooks", path_params=(), scope="webhooks:write", danger="critical", approval=True, body=True, pagination=None), - "webhooks.delete": OperationSpec(action="webhooks.delete", operation_id="webhooks_delete", method="DELETE", path="/webhooks/{id}", path_params=("id",), scope="webhooks:write", danger="destructive", approval=True, body=False, pagination=None), - "webhooks.get": OperationSpec(action="webhooks.get", operation_id="webhooks_get", method="GET", path="/webhooks/{id}", path_params=("id",), scope="webhooks:read", danger="read", approval=True, body=False, pagination=None), - "webhooks.list": OperationSpec(action="webhooks.list", operation_id="webhooks_list", method="GET", path="/webhooks", path_params=(), scope="webhooks:read", danger="read", approval=True, body=False, pagination="cursor"), - "webhooks.pause": OperationSpec(action="webhooks.pause", operation_id="webhooks_pause", method="POST", path="/webhooks/{id}/pause", path_params=("id",), scope="webhooks:write", danger="write", approval=True, body=False, pagination=None), - "webhooks.resume": OperationSpec(action="webhooks.resume", operation_id="webhooks_resume", method="POST", path="/webhooks/{id}/resume", path_params=("id",), scope="webhooks:write", danger="write", approval=True, body=False, pagination=None), - "webhooks.secret.rotate": OperationSpec(action="webhooks.secret.rotate", operation_id="webhooks_secret_rotate", method="POST", path="/webhooks/{id}/rotate", path_params=("id",), scope="webhooks:write", danger="critical", approval=True, body=False, pagination=None), - "webhooks.signature_scheme.change": OperationSpec(action="webhooks.signature_scheme.change", operation_id="webhooks_signature_scheme_change", method="POST", path="/webhooks/{id}/signature-scheme", path_params=("id",), scope="webhooks:write", danger="destructive", approval=True, body=True, pagination=None), - "webhooks.update": OperationSpec(action="webhooks.update", operation_id="webhooks_update", method="PATCH", path="/webhooks/{id}", path_params=("id",), scope="webhooks:write", danger="write", approval=True, body=True, pagination=None), + "access_reviews.close": OperationSpec(action="access_reviews.close", operation_id="access_reviews_close", method="POST", path="/access-reviews/{id}/close", path_params=("id",), scope="governance:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/access-reviews/{id}/close", path_params=("id",))), + "access_reviews.create": OperationSpec(action="access_reviews.create", operation_id="access_reviews_create", method="POST", path="/access-reviews", path_params=(), scope="governance:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/access-reviews", path_params=())), + "access_reviews.get": OperationSpec(action="access_reviews.get", operation_id="access_reviews_get", method="GET", path="/access-reviews/{id}", path_params=("id",), scope="governance:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/access-reviews/{id}", path_params=("id",))), + "access_reviews.items.decide": OperationSpec(action="access_reviews.items.decide", operation_id="access_reviews_items_decide", method="POST", path="/access-reviews/{id}/items/{item_id}", path_params=("id", "item_id"), scope="governance:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/access-review-items/{id}/decide", path_params=("item_id",), query_params=(("access_review_id", "id"),))), + "access_reviews.items.list": OperationSpec(action="access_reviews.items.list", operation_id="access_reviews_items_list", method="GET", path="/access-reviews/{id}/items", path_params=("id",), scope="governance:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/access-reviews/{id}/items", path_params=("id",), pagination="cursor")), + "access_reviews.list": OperationSpec(action="access_reviews.list", operation_id="access_reviews_list", method="GET", path="/access-reviews", path_params=(), scope="governance:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/access-reviews", path_params=(), pagination="cursor")), + "action_approvals.get": OperationSpec(action=None, operation_id=None, method="GET", path="/action-approvals/{id}", path_params=("id",), scope=None, danger=None, approval=False, body=False, pagination=None, v1=V1Route(method="GET", path="/approvals/{id}", path_params=("id",))), + "api_keys.list": OperationSpec(action="api_keys.list", operation_id="api_keys_list", method="GET", path="/organizations/{organization_id}/api-keys", path_params=("organization_id",), scope="api_keys:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/api-keys", path_params=(), query_params=(("organization_id", "organization_id"),), pagination="cursor")), + "api_keys.revoke": OperationSpec(action="api_keys.revoke", operation_id="api_keys_revoke", method="DELETE", path="/api-keys/{id}", path_params=("id",), scope="api_keys:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/api-keys/{id}", path_params=("id",))), + "apis.create": OperationSpec(action="apis.create", operation_id=None, method="POST", path="/apis", path_params=(), scope="apis:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/apis", path_params=())), + "apis.delete": OperationSpec(action="apis.delete", operation_id=None, method="DELETE", path="/apis/{id}", path_params=("id",), scope="apis:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/apis/{id}", path_params=("id",))), + "apis.get": OperationSpec(action="apis.get", operation_id=None, method="GET", path="/apis/{id}", path_params=("id",), scope="apis:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/apis/{id}", path_params=("id",))), + "apis.list": OperationSpec(action="apis.list", operation_id=None, method="GET", path="/apis", path_params=(), scope="apis:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/apis", path_params=(), pagination="cursor")), + "apis.scopes.define": OperationSpec(action="apis.scopes.define", operation_id="apis_scopes_define", method="PUT", path="/apis/{id}/scopes/{key}", path_params=("id", "key"), scope="apis:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/api-scopes/{id}", path_params=("key",), query_params=(("api_id", "id"),))), + "apis.scopes.remove": OperationSpec(action="apis.scopes.remove", operation_id="apis_scopes_remove", method="DELETE", path="/apis/{id}/scopes/{key}", path_params=("id", "key"), scope="apis:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/api-scopes/{id}", path_params=("key",), query_params=(("api_id", "id"),))), + "apis.update": OperationSpec(action="apis.update", operation_id=None, method="PATCH", path="/apis/{id}", path_params=("id",), scope="apis:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/apis/{id}", path_params=("id",))), + "app_catalog.delete": OperationSpec(action="app_catalog.delete", operation_id="app_catalog_delete", method="DELETE", path="/app-catalog/{key}", path_params=("key",), scope="app_catalog:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/app-catalog/{id}", path_params=("key",))), + "app_catalog.list": OperationSpec(action="app_catalog.list", operation_id="app_catalog_list", method="GET", path="/app-catalog", path_params=(), scope="app_catalog:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/app-catalog", path_params=())), + "app_catalog.save": OperationSpec(action="app_catalog.save", operation_id="app_catalog_save", method="PUT", path="/app-catalog/{key}", path_params=("key",), scope="app_catalog:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/app-catalog/{id}", path_params=("key",))), + "app_catalog.show": OperationSpec(action="app_catalog.show", operation_id="app_catalog_show", method="GET", path="/app-catalog/{key}", path_params=("key",), scope="app_catalog:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/app-catalog/{id}", path_params=("key",))), + "approvals.deny": OperationSpec(action="approvals.deny", operation_id="approvals_deny", method="POST", path="/agent-requests/{request_id}/deny", path_params=("request_id",), scope="approvals:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/approvals/{id}/deny", path_params=("request_id",))), + "approvals.list": OperationSpec(action="approvals.list", operation_id="approvals_list", method="GET", path="/agent-requests", path_params=(), scope="approvals:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/approvals", path_params=(), pagination="cursor")), + "apps.blueprint": OperationSpec(action="apps.blueprint", operation_id="apps_blueprint", method="GET", path="/apps/{id}/blueprint", path_params=("id",), scope="apps:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/apps/{id}/blueprint", path_params=("id",))), + "apps.copy": OperationSpec(action="apps.copy", operation_id="apps_copy", method="POST", path="/apps/{id}/copy", path_params=("id",), scope="apps:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/apps/{id}/copy", path_params=("id",))), + "apps.create": OperationSpec(action="apps.create", operation_id="apps_create", method="POST", path="/apps", path_params=(), scope="apps:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/apps", path_params=())), + "apps.delete": OperationSpec(action="apps.delete", operation_id="apps_delete", method="DELETE", path="/apps/{id}", path_params=("id",), scope="apps:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/apps/{id}", path_params=("id",))), + "apps.get": OperationSpec(action="apps.get", operation_id="apps_get", method="GET", path="/apps/{id}", path_params=("id",), scope="apps:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/apps/{id}", path_params=("id",))), + "apps.list": OperationSpec(action="apps.list", operation_id="apps_list", method="GET", path="/apps", path_params=(), scope="apps:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/apps", path_params=(), pagination="cursor")), + "apps.manifest.set": OperationSpec(action="apps.manifest.set", operation_id="apps_manifest_set", method="PUT", path="/apps/{id}/manifest", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/apps/{id}/manifest", path_params=("id",))), + "apps.manifest.sync": OperationSpec(action="apps.manifest.sync", operation_id="apps_manifest_sync", method="POST", path="/apps/{id}/manifest/sync", path_params=("id",), scope="apps:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/apps/{id}/sync-manifest", path_params=("id",))), + "apps.scopes.set": OperationSpec(action="apps.scopes.set", operation_id="apps_scopes_set", method="PUT", path="/apps/{id}/scopes", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/apps/{id}/scopes", path_params=("id",))), + "apps.secrets.list": OperationSpec(action="apps.secrets.list", operation_id="apps_secrets_list", method="GET", path="/apps/{id}/secrets", path_params=("id",), scope="apps:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/apps/{id}/secrets", path_params=("id",))), + "apps.secrets.revoke": OperationSpec(action="apps.secrets.revoke", operation_id="apps_secrets_revoke", method="DELETE", path="/apps/{id}/secrets/{secret_id}", path_params=("id", "secret_id"), scope="apps:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/app-secrets/{id}", path_params=("secret_id",), query_params=(("app_id", "id"),))), + "apps.secrets.rotate": OperationSpec(action="apps.secrets.rotate", operation_id="apps_secrets_rotate", method="POST", path="/apps/{id}/secrets", path_params=("id",), scope="apps:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/apps/{id}/secrets", path_params=("id",))), + "apps.settings.api_key_prefix": OperationSpec(action="apps.settings.api_key_prefix", operation_id="apps_settings_api_key_prefix", method="PUT", path="/apps/{id}/settings/api-key-prefix", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/apps/{id}/api-key-prefix", path_params=("id",))), + "apps.settings.backchannel_logout": OperationSpec(action="apps.settings.backchannel_logout", operation_id="apps_settings_backchannel_logout", method="PUT", path="/apps/{id}/settings/backchannel-logout", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/apps/{id}/backchannel-logout", path_params=("id",))), + "apps.settings.client_credentials": OperationSpec(action="apps.settings.client_credentials", operation_id="apps_settings_client_credentials", method="PUT", path="/apps/{id}/settings/client-credentials", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/apps/{id}/client-credentials", path_params=("id",))), + "apps.settings.token_exchange": OperationSpec(action="apps.settings.token_exchange", operation_id="apps_settings_token_exchange", method="PUT", path="/apps/{id}/settings/token-exchange", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/apps/{id}/token-exchange", path_params=("id",))), + "apps.settings.token_lifetime": OperationSpec(action="apps.settings.token_lifetime", operation_id="apps_settings_token_lifetime", method="PUT", path="/apps/{id}/settings/token-lifetime", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/apps/{id}/token-lifetime", path_params=("id",))), + "apps.update": OperationSpec(action="apps.update", operation_id="apps_update", method="PATCH", path="/apps/{id}", path_params=("id",), scope="apps:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/apps/{id}", path_params=("id",))), + "audit.list": OperationSpec(action="audit.list", operation_id="audit_list", method="GET", path="/audit-log", path_params=(), scope="audit:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/audit-events", path_params=(), pagination="cursor")), + "audit_logs.events.create": OperationSpec(action="audit_logs.events.create", operation_id="audit_logs_events_create", method="POST", path="/audit-logs/events", path_params=(), scope="audit_logs:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/audit-log-events", path_params=())), + "audit_logs.events.list": OperationSpec(action="audit_logs.events.list", operation_id="audit_logs_events_list", method="GET", path="/audit-logs/events", path_params=(), scope="audit_logs:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/audit-log-events", path_params=(), pagination="cursor")), + "audit_logs.exports.create": OperationSpec(action="audit_logs.exports.create", operation_id="audit_logs_exports_create", method="POST", path="/audit-logs/exports", path_params=(), scope="audit_logs:export", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/audit-log-exports", path_params=())), + "audit_logs.exports.get": OperationSpec(action="audit_logs.exports.get", operation_id="audit_logs_exports_get", method="GET", path="/audit-logs/exports/{id}", path_params=("id",), scope="audit_logs:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/audit-log-exports/{id}", path_params=("id",))), + "audit_logs.schemas.create": OperationSpec(action="audit_logs.schemas.create", operation_id="audit_logs_schemas_create", method="POST", path="/audit-logs/schemas", path_params=(), scope="audit_logs:manage", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/audit-log-schemas", path_params=())), + "audit_logs.schemas.delete": OperationSpec(action="audit_logs.schemas.delete", operation_id="audit_logs_schemas_delete", method="DELETE", path="/audit-logs/schemas/{action}", path_params=("action",), scope="audit_logs:manage", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/audit-log-schemas/{id}", path_params=("action",))), + "audit_logs.schemas.get": OperationSpec(action="audit_logs.schemas.get", operation_id="audit_logs_schemas_get", method="GET", path="/audit-logs/schemas/{action}", path_params=("action",), scope="audit_logs:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/audit-log-schemas/{id}", path_params=("action",))), + "audit_logs.schemas.list": OperationSpec(action="audit_logs.schemas.list", operation_id="audit_logs_schemas_list", method="GET", path="/audit-logs/schemas", path_params=(), scope="audit_logs:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/audit-log-schemas", path_params=(), pagination="cursor")), + "audit_logs.schemas.update": OperationSpec(action="audit_logs.schemas.update", operation_id="audit_logs_schemas_update", method="PUT", path="/audit-logs/schemas/{action}", path_params=("action",), scope="audit_logs:manage", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/audit-log-schemas/{id}", path_params=("action",))), + "audit_logs.settings.get": OperationSpec(action="audit_logs.settings.get", operation_id="audit_logs_settings_get", method="GET", path="/audit-logs/settings", path_params=(), scope="audit_logs:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/audit-log-settings", path_params=())), + "audit_logs.settings.update": OperationSpec(action="audit_logs.settings.update", operation_id="audit_logs_settings_update", method="PATCH", path="/audit-logs/settings", path_params=(), scope="audit_logs:manage", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/audit-log-settings", path_params=())), + "audit_logs.verify": OperationSpec(action="audit_logs.verify", operation_id="audit_logs_verify", method="GET", path="/audit-logs/verify", path_params=(), scope="audit_logs:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/audit-log-events/verify", path_params=())), + "authenticator.me.list": OperationSpec(action=None, operation_id="authenticatorIdentity", method="GET", path="/authenticator/me", path_params=(), scope=None, danger=None, approval=False, body=False, pagination=None, v1=V1Route(method="GET", path="/me/authenticator", path_params=())), + "branding.appearance.get": OperationSpec(action="branding.appearance.get", operation_id="branding_appearance_get", method="GET", path="/branding/appearance", path_params=(), scope="branding:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/appearance", path_params=())), + "branding.appearance.set": OperationSpec(action="branding.appearance.set", operation_id="branding_appearance_set", method="PUT", path="/branding/appearance", path_params=(), scope="branding:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/appearance", path_params=())), + "branding.whitelabel.get": OperationSpec(action="branding.whitelabel.get", operation_id="branding_whitelabel_get", method="GET", path="/branding/whitelabel", path_params=(), scope="branding:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/whitelabel", path_params=())), + "branding.whitelabel.set": OperationSpec(action="branding.whitelabel.set", operation_id="branding_whitelabel_set", method="PUT", path="/branding/whitelabel", path_params=(), scope="branding:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/whitelabel", path_params=())), + "directories.connect": OperationSpec(action="directories.connect", operation_id="directories_connect", method="POST", path="/directories/connect", path_params=(), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/directories/connect", path_params=())), + "directories.create": OperationSpec(action="directories.create", operation_id="directories_create", method="POST", path="/directories", path_params=(), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/directories", path_params=())), + "directories.credentials.replace": OperationSpec(action="directories.credentials.replace", operation_id="directories_credentials_replace", method="PUT", path="/directories/{id}/credentials", path_params=("id",), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/directories/{id}/credentials", path_params=("id",))), + "directories.delete": OperationSpec(action="directories.delete", operation_id="directories_delete", method="DELETE", path="/directories/{id}", path_params=("id",), scope="directory_sync:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/directories/{id}", path_params=("id",))), + "directories.get": OperationSpec(action="directories.get", operation_id="directories_get", method="GET", path="/directories/{id}", path_params=("id",), scope="directory_sync:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/directories/{id}", path_params=("id",))), + "directories.groups.list": OperationSpec(action="directories.groups.list", operation_id="directories_groups_list", method="GET", path="/directories/{id}/groups", path_params=("id",), scope="directory_sync:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/directories/{id}/groups", path_params=("id",), pagination="cursor")), + "directories.groups.map": OperationSpec(action="directories.groups.map", operation_id="directories_groups_map", method="POST", path="/directories/{id}/group-roles", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/directories/{id}/group-roles", path_params=("id",))), + "directories.hris.connect": OperationSpec(action="directories.hris.connect", operation_id="directories_hris_connect", method="POST", path="/directories/hris", path_params=(), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/directories/connect-hris", path_params=())), + "directories.list": OperationSpec(action="directories.list", operation_id="directories_list", method="GET", path="/directories", path_params=(), scope="directory_sync:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/directories", path_params=(), pagination="cursor")), + "directories.status.set": OperationSpec(action="directories.status.set", operation_id="directories_status_set", method="POST", path="/directories/{id}/status", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/directories/{id}/status", path_params=("id",))), + "directories.sync": OperationSpec(action="directories.sync", operation_id="directories_sync", method="POST", path="/directories/{id}/sync", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/directories/{id}/sync", path_params=("id",))), + "directories.sync_settings.update": OperationSpec(action="directories.sync_settings.update", operation_id="directories_sync_settings_update", method="PATCH", path="/directories/{id}/sync-settings", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/directories/{id}/sync-settings", path_params=("id",))), + "directories.token.rotate": OperationSpec(action="directories.token.rotate", operation_id="directories_token_rotate", method="POST", path="/directories/{id}/rotate", path_params=("id",), scope="directory_sync:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/directories/{id}/rotate", path_params=("id",))), + "directories.update": OperationSpec(action="directories.update", operation_id="directories_update", method="PATCH", path="/directories/{id}", path_params=("id",), scope="directory_sync:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/directories/{id}", path_params=("id",))), + "domains.add": OperationSpec(action="domains.add", operation_id="domains_add", method="POST", path="/domains", path_params=(), scope="domains:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/environment-domain", path_params=())), + "domains.get": OperationSpec(action="domains.get", operation_id="domains_get", method="GET", path="/domains", path_params=(), scope="domains:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/environment-domain", path_params=())), + "domains.remove": OperationSpec(action="domains.remove", operation_id="domains_remove", method="DELETE", path="/domains", path_params=(), scope="domains:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/environment-domain", path_params=())), + "domains.verify": OperationSpec(action="domains.verify", operation_id="domains_verify", method="POST", path="/domains/verify", path_params=(), scope="domains:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/environment-domain/verify", path_params=())), + "events.list": OperationSpec(action="events.list", operation_id="events_list", method="GET", path="/events", path_params=(), scope="events:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/events", path_params=(), pagination="cursor")), + "feature_flags.create": OperationSpec(action="feature_flags.create", operation_id="feature_flags_create", method="POST", path="/feature-flags", path_params=(), scope="feature_flags:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/feature-flags", path_params=())), + "feature_flags.delete": OperationSpec(action="feature_flags.delete", operation_id="feature_flags_delete", method="DELETE", path="/feature-flags/{id}", path_params=("id",), scope="feature_flags:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/feature-flags/{id}", path_params=("id",))), + "feature_flags.evaluate": OperationSpec(action="feature_flags.evaluate", operation_id="feature_flags_evaluate", method="GET", path="/feature-flags/evaluate", path_params=(), scope="feature_flags:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/feature-flags/evaluate", path_params=())), + "feature_flags.get": OperationSpec(action="feature_flags.get", operation_id="feature_flags_get", method="GET", path="/feature-flags/{id}", path_params=("id",), scope="feature_flags:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/feature-flags/{id}", path_params=("id",))), + "feature_flags.list": OperationSpec(action="feature_flags.list", operation_id="feature_flags_list", method="GET", path="/feature-flags", path_params=(), scope="feature_flags:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/feature-flags", path_params=(), pagination="cursor")), + "feature_flags.update": OperationSpec(action="feature_flags.update", operation_id="feature_flags_update", method="PATCH", path="/feature-flags/{id}", path_params=("id",), scope="feature_flags:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/feature-flags/{id}", path_params=("id",))), + "fga.check": OperationSpec(action="fga.check", operation_id="fga_check", method="GET", path="/fga/check", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/fga/check", path_params=())), + "fga.check_batch": OperationSpec(action="fga.check_batch", operation_id="fga_check_batch", method="GET", path="/fga/check/batch", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/fga/check-batch", path_params=())), + "fga.resources.list": OperationSpec(action="fga.resources.list", operation_id="fga_resources_list", method="GET", path="/fga/resources", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/fga/resources", path_params=(), pagination="cursor")), + "fga.schema.get": OperationSpec(action="fga.schema.get", operation_id="fga_schema_get", method="GET", path="/fga/schema", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/fga/schema", path_params=())), + "fga.schema.update": OperationSpec(action="fga.schema.update", operation_id="fga_schema_update", method="PUT", path="/fga/schema", path_params=(), scope="fga:schema", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/fga/schema", path_params=())), + "fga.schema.validate": OperationSpec(action="fga.schema.validate", operation_id="fga_schema_validate", method="GET", path="/fga/schema/validate", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/fga/validate-schema", path_params=())), + "fga.subjects.list": OperationSpec(action="fga.subjects.list", operation_id="fga_subjects_list", method="GET", path="/fga/subjects", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/fga/subjects", path_params=(), pagination="cursor")), + "fga.tuples.delete": OperationSpec(action="fga.tuples.delete", operation_id="fga_tuples_delete", method="POST", path="/fga/tuples/delete", path_params=(), scope="fga:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/fga/delete-tuples", path_params=())), + "fga.tuples.list": OperationSpec(action="fga.tuples.list", operation_id="fga_tuples_list", method="GET", path="/fga/tuples", path_params=(), scope="fga:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/fga/tuples", path_params=(), pagination="cursor")), + "fga.tuples.write": OperationSpec(action="fga.tuples.write", operation_id="fga_tuples_write", method="POST", path="/fga/tuples", path_params=(), scope="fga:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/fga/tuples", path_params=())), + "frontend_keys.create": OperationSpec(action="frontend_keys.create", operation_id="frontend_keys_create", method="POST", path="/frontend-keys", path_params=(), scope="frontend_keys:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/frontend-keys", path_params=())), + "frontend_keys.list": OperationSpec(action="frontend_keys.list", operation_id="frontend_keys_list", method="GET", path="/frontend-keys", path_params=(), scope="frontend_keys:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/frontend-keys", path_params=(), pagination="cursor")), + "frontend_keys.revoke": OperationSpec(action="frontend_keys.revoke", operation_id="frontend_keys_revoke", method="DELETE", path="/frontend-keys/{id}", path_params=("id",), scope="frontend_keys:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/frontend-keys/{id}", path_params=("id",))), + "frontend_keys.set_origins": OperationSpec(action="frontend_keys.set_origins", operation_id="frontend_keys_set_origins", method="PUT", path="/frontend-keys/{id}/origins", path_params=("id",), scope="frontend_keys:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/frontend-keys/{id}/origins", path_params=("id",))), + "hooks.create": OperationSpec(action="hooks.create", operation_id="hooks_create", method="POST", path="/hooks", path_params=(), scope="hooks:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/hooks", path_params=())), + "hooks.delete": OperationSpec(action="hooks.delete", operation_id="hooks_delete", method="DELETE", path="/hooks/{id}", path_params=("id",), scope="hooks:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/hooks/{id}", path_params=("id",))), + "hooks.get": OperationSpec(action="hooks.get", operation_id="hooks_get", method="GET", path="/hooks/{id}", path_params=("id",), scope="hooks:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/hooks/{id}", path_params=("id",))), + "hooks.list": OperationSpec(action="hooks.list", operation_id="hooks_list", method="GET", path="/hooks", path_params=(), scope="hooks:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/hooks", path_params=(), pagination="cursor")), + "hooks.update": OperationSpec(action="hooks.update", operation_id="hooks_update", method="PATCH", path="/hooks/{id}", path_params=("id",), scope="hooks:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/hooks/{id}", path_params=("id",))), + "invitations.get": OperationSpec(action="invitations.get", operation_id="invitations_get", method="GET", path="/organizations/{organization_id}/invitations/{invitation_id}", path_params=("organization_id", "invitation_id"), scope="invitations:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/organization-invitations/{id}", path_params=("invitation_id",), query_params=(("organization_id", "organization_id"),))), + "invitations.list": OperationSpec(action="invitations.list", operation_id="invitations_list", method="GET", path="/organizations/{organization_id}/invitations", path_params=("organization_id",), scope="invitations:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/organization-invitations", path_params=(), query_params=(("organization_id", "organization_id"),), pagination="cursor")), + "invitations.resend": OperationSpec(action="invitations.resend", operation_id="invitations_resend", method="POST", path="/organizations/{organization_id}/invitations/{invitation_id}/resend", path_params=("organization_id", "invitation_id"), scope="invitations:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/organization-invitations/{id}/resend", path_params=("invitation_id",), query_params=(("organization_id", "organization_id"),))), + "invitations.revoke": OperationSpec(action="invitations.revoke", operation_id="invitations_revoke", method="DELETE", path="/organizations/{organization_id}/invitations/{invitation_id}", path_params=("organization_id", "invitation_id"), scope="invitations:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/organization-invitations/{id}", path_params=("invitation_id",), query_params=(("organization_id", "organization_id"),))), + "invitations.send": OperationSpec(action="invitations.send", operation_id="invitations_send", method="POST", path="/organizations/{organization_id}/invitations", path_params=("organization_id",), scope="invitations:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/organization-invitations", path_params=(), query_params=(("organization_id", "organization_id"),))), + "keys.create": OperationSpec(action="keys.create", operation_id="keys_create", method="POST", path="/keys", path_params=(), scope="keys:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/environment-keys", path_params=())), + "keys.list": OperationSpec(action="keys.list", operation_id="keys_list", method="GET", path="/keys", path_params=(), scope="keys:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/environment-keys", path_params=(), pagination="cursor")), + "keys.revoke": OperationSpec(action="keys.revoke", operation_id="keys_revoke", method="DELETE", path="/keys/{id}", path_params=("id",), scope="keys:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/environment-keys/{id}", path_params=("id",))), + "keys.rotate": OperationSpec(action="keys.rotate", operation_id="keys_rotate", method="POST", path="/keys/{id}/rotate", path_params=("id",), scope="keys:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/environment-keys/{id}/rotate", path_params=("id",))), + "legacy_login.approve": OperationSpec(action="legacy_login.approve", operation_id="legacy_login_approve", method="POST", path="/legacy-login/approve", path_params=(), scope="signin:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/legacy-login/approve", path_params=())), + "legacy_login.get": OperationSpec(action="legacy_login.get", operation_id="legacy_login_get", method="GET", path="/legacy-login", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/legacy-login", path_params=())), + "legacy_login.probe": OperationSpec(action="legacy_login.probe", operation_id="legacy_login_probe", method="POST", path="/legacy-login/probe", path_params=(), scope="signin:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/legacy-login/probe", path_params=())), + "legacy_login.revoke": OperationSpec(action="legacy_login.revoke", operation_id="legacy_login_revoke", method="POST", path="/legacy-login/revoke", path_params=(), scope="signin:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/legacy-login/revoke", path_params=())), + "log_streams.create": OperationSpec(action="log_streams.create", operation_id="log_streams_create", method="POST", path="/log-streams", path_params=(), scope="log_streams:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/log-streams", path_params=())), + "log_streams.delete": OperationSpec(action="log_streams.delete", operation_id="log_streams_delete", method="DELETE", path="/log-streams/{id}", path_params=("id",), scope="log_streams:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/log-streams/{id}", path_params=("id",))), + "log_streams.get": OperationSpec(action="log_streams.get", operation_id="log_streams_get", method="GET", path="/log-streams/{id}", path_params=("id",), scope="log_streams:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/log-streams/{id}", path_params=("id",))), + "log_streams.list": OperationSpec(action="log_streams.list", operation_id="log_streams_list", method="GET", path="/log-streams", path_params=(), scope="log_streams:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/log-streams", path_params=(), pagination="cursor")), + "log_streams.test": OperationSpec(action="log_streams.test", operation_id="log_streams_test", method="POST", path="/log-streams/{id}/test", path_params=("id",), scope="log_streams:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/log-streams/{id}/test", path_params=("id",))), + "log_streams.update": OperationSpec(action="log_streams.update", operation_id="log_streams_update", method="PATCH", path="/log-streams/{id}", path_params=("id",), scope="log_streams:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/log-streams/{id}", path_params=("id",))), + "members.add": OperationSpec(action="members.add", operation_id="members_add", method="POST", path="/organizations/{organization_id}/members", path_params=("organization_id",), scope="members:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/organization-memberships", path_params=(), query_params=(("organization_id", "organization_id"),))), + "members.apps.roles.replace": OperationSpec(action="members.apps.roles.replace", operation_id="members_apps_roles_replace", method="PUT", path="/organizations/{organization_id}/members/{user_id}/apps/{client_id}/roles", path_params=("organization_id", "user_id", "client_id"), scope="roles:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/organization-memberships/{id}/app-roles", path_params=("user_id",), query_params=(("organization_id", "organization_id"), ("client_id", "client_id")))), + "members.list": OperationSpec(action="members.list", operation_id="members_list", method="GET", path="/organizations/{organization_id}/members", path_params=("organization_id",), scope="members:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/organization-memberships", path_params=(), query_params=(("organization_id", "organization_id"),), pagination="cursor")), + "members.remove": OperationSpec(action="members.remove", operation_id="members_remove", method="DELETE", path="/organizations/{organization_id}/members/{user_id}", path_params=("organization_id", "user_id"), scope="members:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/organization-memberships/{id}", path_params=("user_id",), query_params=(("organization_id", "organization_id"),))), + "members.roles.grant": OperationSpec(action="members.roles.grant", operation_id="members_roles_grant", method="PUT", path="/organizations/{organization_id}/members/{user_id}/roles/{role_id}", path_params=("organization_id", "user_id", "role_id"), scope="roles:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="PUT", path="/role-assignments/{id}", path_params=("role_id",), query_params=(("organization_id", "organization_id"), ("user_id", "user_id")))), + "members.roles.list": OperationSpec(action="members.roles.list", operation_id="members_roles_list", method="GET", path="/organizations/{organization_id}/members/{user_id}/roles", path_params=("organization_id", "user_id"), scope="roles:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/role-assignments", path_params=(), query_params=(("organization_id", "organization_id"), ("user_id", "user_id")))), + "members.roles.revoke": OperationSpec(action="members.roles.revoke", operation_id="members_roles_revoke", method="DELETE", path="/organizations/{organization_id}/members/{user_id}/roles/{role_id}", path_params=("organization_id", "user_id", "role_id"), scope="roles:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/role-assignments/{id}", path_params=("role_id",), query_params=(("organization_id", "organization_id"), ("user_id", "user_id")))), + "members.update": OperationSpec(action="members.update", operation_id="members_update", method="PATCH", path="/organizations/{organization_id}/members/{user_id}", path_params=("organization_id", "user_id"), scope="members:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/organization-memberships/{id}", path_params=("user_id",), query_params=(("organization_id", "organization_id"),))), + "organizations.create": OperationSpec(action="organizations.create", operation_id="organizations_create", method="POST", path="/organizations", path_params=(), scope="organizations:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/organizations", path_params=())), + "organizations.delete": OperationSpec(action="organizations.delete", operation_id="organizations_delete", method="DELETE", path="/organizations/{id}", path_params=("id",), scope="organizations:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/organizations/{id}", path_params=("id",))), + "organizations.domains.add": OperationSpec(action="organizations.domains.add", operation_id="organizations_domains_add", method="POST", path="/organizations/{organization_id}/domains", path_params=("organization_id",), scope="organizations:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/organization-domains", path_params=(), body_params=(("organization_id", "organization_id"),))), + "organizations.domains.capture": OperationSpec(action="organizations.domains.capture", operation_id="organizations_domains_capture", method="PUT", path="/organizations/{organization_id}/domains/{domain_id}/capture", path_params=("organization_id", "domain_id"), scope="organizations:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/organization-domains/{id}", path_params=("domain_id",), body_params=(("organization_id", "organization_id"),))), + "organizations.domains.list": OperationSpec(action="organizations.domains.list", operation_id="organizations_domains_list", method="GET", path="/organizations/{organization_id}/domains", path_params=("organization_id",), scope="organizations:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/organization-domains", path_params=(), query_params=(("organization_id", "organization_id"),), pagination="cursor")), + "organizations.domains.remove": OperationSpec(action="organizations.domains.remove", operation_id="organizations_domains_remove", method="DELETE", path="/organizations/{organization_id}/domains/{domain_id}", path_params=("organization_id", "domain_id"), scope="organizations:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/organization-domains/{id}", path_params=("domain_id",), body_params=(("organization_id", "organization_id"),))), + "organizations.domains.verify": OperationSpec(action="organizations.domains.verify", operation_id="organizations_domains_verify", method="POST", path="/organizations/{organization_id}/domains/{domain_id}/verify", path_params=("organization_id", "domain_id"), scope="organizations:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/organization-domains/{id}/verify", path_params=("domain_id",), body_params=(("organization_id", "organization_id"),))), + "organizations.get": OperationSpec(action="organizations.get", operation_id="organizations_get", method="GET", path="/organizations/{id}", path_params=("id",), scope="organizations:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/organizations/{id}", path_params=("id",))), + "organizations.list": OperationSpec(action="organizations.list", operation_id="organizations_list", method="GET", path="/organizations", path_params=(), scope="organizations:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/organizations", path_params=(), pagination="cursor")), + "organizations.portal_links.create": OperationSpec(action="organizations.portal_links.create", operation_id="organizations_portal_links_create", method="POST", path="/organizations/{organization_id}/portal-links", path_params=("organization_id",), scope="portal_links:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/portal-links", path_params=(), query_params=(("organization_id", "organization_id"),))), + "organizations.portal_links.list": OperationSpec(action="organizations.portal_links.list", operation_id="organizations_portal_links_list", method="GET", path="/organizations/{organization_id}/portal-links", path_params=("organization_id",), scope="portal_links:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/portal-links", path_params=(), query_params=(("organization_id", "organization_id"),))), + "organizations.portal_links.revoke": OperationSpec(action="organizations.portal_links.revoke", operation_id="organizations_portal_links_revoke", method="DELETE", path="/organizations/{organization_id}/portal-links/{id}", path_params=("organization_id", "id"), scope="portal_links:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/portal-links/{id}", path_params=("id",), query_params=(("organization_id", "organization_id"),))), + "organizations.reactivate": OperationSpec(action="organizations.reactivate", operation_id="organizations_reactivate", method="POST", path="/organizations/{id}/reactivate", path_params=("id",), scope="organizations:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/organizations/{id}/reactivate", path_params=("id",))), + "organizations.suspend": OperationSpec(action="organizations.suspend", operation_id="organizations_suspend", method="POST", path="/organizations/{id}/suspend", path_params=("id",), scope="organizations:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/organizations/{id}/suspend", path_params=("id",))), + "organizations.transfer_ownership": OperationSpec(action="organizations.transfer_ownership", operation_id="organizations_transfer_ownership", method="POST", path="/organizations/{id}/transfer-ownership", path_params=("id",), scope="organizations:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/organizations/{id}/transfer-ownership", path_params=("id",))), + "organizations.update": OperationSpec(action="organizations.update", operation_id="organizations_update", method="PATCH", path="/organizations/{id}", path_params=("id",), scope="organizations:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/organizations/{id}", path_params=("id",))), + "permissions.create": OperationSpec(action="permissions.create", operation_id="permissions_create", method="POST", path="/permissions", path_params=(), scope="role_definitions:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/permissions", path_params=())), + "permissions.delete": OperationSpec(action="permissions.delete", operation_id="permissions_delete", method="DELETE", path="/permissions/{id}", path_params=("id",), scope="role_definitions:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/permissions/{id}", path_params=("id",))), + "permissions.list": OperationSpec(action="permissions.list", operation_id="permissions_list", method="GET", path="/permissions", path_params=(), scope="roles:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/permissions", path_params=(), pagination="cursor")), + "permissions.update": OperationSpec(action="permissions.update", operation_id="permissions_update", method="PATCH", path="/permissions/{id}", path_params=("id",), scope="role_definitions:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/permissions/{id}", path_params=("id",))), + "pipes.connections.delete": OperationSpec(action="pipes.connections.delete", operation_id="pipes_connections_delete", method="DELETE", path="/pipes/{id}/connections/{connection_id}", path_params=("id", "connection_id"), scope="pipes:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/pipe-connections/{id}", path_params=("connection_id",), query_params=(("pipe_id", "id"),))), + "pipes.connections.list": OperationSpec(action="pipes.connections.list", operation_id="pipes_connections_list", method="GET", path="/pipes/{id}/connections", path_params=("id",), scope="pipes:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/pipes/{id}/connections", path_params=("id",), pagination="cursor")), + "pipes.create": OperationSpec(action="pipes.create", operation_id="pipes_create", method="POST", path="/pipes", path_params=(), scope="pipes:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/pipes", path_params=())), + "pipes.delete": OperationSpec(action="pipes.delete", operation_id="pipes_delete", method="DELETE", path="/pipes/{id}", path_params=("id",), scope="pipes:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/pipes/{id}", path_params=("id",))), + "pipes.get": OperationSpec(action="pipes.get", operation_id="pipes_get", method="GET", path="/pipes/{id}", path_params=("id",), scope="pipes:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/pipes/{id}", path_params=("id",))), + "pipes.grants.create": OperationSpec(action="pipes.grants.create", operation_id="pipes_grants_create", method="POST", path="/pipes/{id}/grants", path_params=("id",), scope="pipes:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/pipes/{id}/grants", path_params=("id",))), + "pipes.grants.delete": OperationSpec(action="pipes.grants.delete", operation_id="pipes_grants_delete", method="DELETE", path="/pipes/{id}/grants/{client_id}", path_params=("id", "client_id"), scope="pipes:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/pipe-grants/{id}", path_params=("client_id",), query_params=(("pipe_id", "id"),))), + "pipes.list": OperationSpec(action="pipes.list", operation_id="pipes_list", method="GET", path="/pipes", path_params=(), scope="pipes:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/pipes", path_params=(), pagination="cursor")), + "pipes.update": OperationSpec(action="pipes.update", operation_id="pipes_update", method="PATCH", path="/pipes/{id}", path_params=("id",), scope="pipes:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/pipes/{id}", path_params=("id",))), + "provisioning.targets.create": OperationSpec(action="provisioning.targets.create", operation_id="provisioning_targets_create", method="POST", path="/provisioning-targets", path_params=(), scope="provisioning:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/provisioning-targets", path_params=())), + "provisioning.targets.delete": OperationSpec(action="provisioning.targets.delete", operation_id="provisioning_targets_delete", method="DELETE", path="/provisioning-targets/{id}", path_params=("id",), scope="provisioning:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/provisioning-targets/{id}", path_params=("id",))), + "provisioning.targets.get": OperationSpec(action="provisioning.targets.get", operation_id="provisioning_targets_get", method="GET", path="/provisioning-targets/{id}", path_params=("id",), scope="provisioning:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/provisioning-targets/{id}", path_params=("id",))), + "provisioning.targets.list": OperationSpec(action="provisioning.targets.list", operation_id="provisioning_targets_list", method="GET", path="/provisioning-targets", path_params=(), scope="provisioning:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/provisioning-targets", path_params=(), pagination="cursor")), + "provisioning.targets.status.set": OperationSpec(action="provisioning.targets.status.set", operation_id="provisioning_targets_status_set", method="POST", path="/provisioning-targets/{id}/status", path_params=("id",), scope="provisioning:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/provisioning-targets/{id}/status", path_params=("id",))), + "radar.decisions.get": OperationSpec(action="radar.decisions.get", operation_id="radar_decisions_get", method="GET", path="/radar/decisions/{id}", path_params=("id",), scope="radar:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/radar-decisions/{id}", path_params=("id",))), + "radar.decisions.list": OperationSpec(action="radar.decisions.list", operation_id="radar_decisions_list", method="GET", path="/radar/decisions", path_params=(), scope="radar:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/radar-decisions", path_params=(), pagination="cursor")), + "radar.lists.add": OperationSpec(action="radar.lists.add", operation_id="radar_lists_add", method="POST", path="/radar/lists", path_params=(), scope="radar:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/radar-lists", path_params=())), + "radar.lists.list": OperationSpec(action="radar.lists.list", operation_id="radar_lists_list", method="GET", path="/radar/lists", path_params=(), scope="radar:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/radar-lists", path_params=(), pagination="cursor")), + "radar.lists.remove": OperationSpec(action="radar.lists.remove", operation_id="radar_lists_remove", method="DELETE", path="/radar/lists/{id}", path_params=("id",), scope="radar:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/radar-lists/{id}", path_params=("id",))), + "radar.mode.set": OperationSpec(action="radar.mode.set", operation_id="radar_mode_set", method="PUT", path="/radar/mode", path_params=(), scope="radar:manage", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/radar-settings/set-mode", path_params=())), + "radar.rules.create": OperationSpec(action="radar.rules.create", operation_id="radar_rules_create", method="POST", path="/radar/rules", path_params=(), scope="radar:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/radar-rules", path_params=())), + "radar.rules.delete": OperationSpec(action="radar.rules.delete", operation_id="radar_rules_delete", method="DELETE", path="/radar/rules/{id}", path_params=("id",), scope="radar:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/radar-rules/{id}", path_params=("id",))), + "radar.rules.get": OperationSpec(action="radar.rules.get", operation_id="radar_rules_get", method="GET", path="/radar/rules/{id}", path_params=("id",), scope="radar:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/radar-rules/{id}", path_params=("id",))), + "radar.rules.list": OperationSpec(action="radar.rules.list", operation_id="radar_rules_list", method="GET", path="/radar/rules", path_params=(), scope="radar:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/radar-rules", path_params=(), pagination="cursor")), + "radar.rules.reorder": OperationSpec(action="radar.rules.reorder", operation_id="radar_rules_reorder", method="PUT", path="/radar/rules/order", path_params=(), scope="radar:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/radar-rules/reorder", path_params=())), + "radar.rules.update": OperationSpec(action="radar.rules.update", operation_id="radar_rules_update", method="PATCH", path="/radar/rules/{id}", path_params=("id",), scope="radar:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/radar-rules/{id}", path_params=("id",))), + "radar.settings.get": OperationSpec(action="radar.settings.get", operation_id="radar_settings_get", method="GET", path="/radar/settings", path_params=(), scope="radar:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/radar-settings", path_params=())), + "radar.settings.update": OperationSpec(action="radar.settings.update", operation_id="radar_settings_update", method="PATCH", path="/radar/settings", path_params=(), scope="radar:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/radar-settings", path_params=())), + "roles.create": OperationSpec(action="roles.create", operation_id="roles_create", method="POST", path="/roles", path_params=(), scope="role_definitions:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/roles", path_params=())), + "roles.definition.activate": OperationSpec(action="roles.definition.activate", operation_id="roles_definition_activate", method="POST", path="/roles/{id}/definition/activate", path_params=("id",), scope="role_definitions:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/roles/{id}/activate-definition", path_params=("id",))), + "roles.delete": OperationSpec(action="roles.delete", operation_id="roles_delete", method="DELETE", path="/roles/{id}", path_params=("id",), scope="role_definitions:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/roles/{id}", path_params=("id",))), + "roles.get": OperationSpec(action="roles.get", operation_id="roles_get", method="GET", path="/roles/{id}", path_params=("id",), scope="roles:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/roles/{id}", path_params=("id",))), + "roles.list": OperationSpec(action="roles.list", operation_id="roles_list", method="GET", path="/roles", path_params=(), scope="roles:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/roles", path_params=())), + "roles.permissions.grant": OperationSpec(action="roles.permissions.grant", operation_id="roles_permissions_grant", method="PUT", path="/roles/{id}/permissions/{permission_id}", path_params=("id", "permission_id"), scope="role_definitions:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="PUT", path="/role-permissions/{id}", path_params=("permission_id",), query_params=(("role_id", "id"),))), + "roles.permissions.revoke": OperationSpec(action="roles.permissions.revoke", operation_id="roles_permissions_revoke", method="DELETE", path="/roles/{id}/permissions/{permission_id}", path_params=("id", "permission_id"), scope="role_definitions:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/role-permissions/{id}", path_params=("permission_id",), query_params=(("role_id", "id"),))), + "roles.update": OperationSpec(action="roles.update", operation_id="roles_update", method="PATCH", path="/roles/{id}", path_params=("id",), scope="role_definitions:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/roles/{id}", path_params=("id",))), + "saml_apps.create": OperationSpec(action="saml_apps.create", operation_id="saml_apps_create", method="POST", path="/saml-apps", path_params=(), scope="saml_apps:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/saml-apps", path_params=())), + "saml_apps.delete": OperationSpec(action="saml_apps.delete", operation_id="saml_apps_delete", method="DELETE", path="/saml-apps/{id}", path_params=("id",), scope="saml_apps:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/saml-apps/{id}", path_params=("id",))), + "saml_apps.get": OperationSpec(action="saml_apps.get", operation_id="saml_apps_get", method="GET", path="/saml-apps/{id}", path_params=("id",), scope="saml_apps:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/saml-apps/{id}", path_params=("id",))), + "saml_apps.list": OperationSpec(action="saml_apps.list", operation_id="saml_apps_list", method="GET", path="/saml-apps", path_params=(), scope="saml_apps:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/saml-apps", path_params=(), pagination="cursor")), + "saml_apps.update": OperationSpec(action="saml_apps.update", operation_id="saml_apps_update", method="PATCH", path="/saml-apps/{id}", path_params=("id",), scope="saml_apps:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/saml-apps/{id}", path_params=("id",))), + "signals.source.erasures.list": OperationSpec(action=None, operation_id="signals_source_erasures", method="GET", path="/signals/source/erasures", path_params=(), scope=None, danger=None, approval=False, body=False, pagination="cursor", v1=V1Route(method="GET", path="/signals-source/erasures", path_params=(), pagination="cursor")), + "signals.source.list": OperationSpec(action=None, operation_id="signals_source_list", method="GET", path="/signals/source", path_params=(), scope=None, danger=None, approval=False, body=False, pagination="cursor", v1=V1Route(method="GET", path="/signals-source", path_params=(), pagination="cursor")), + "signin.policy.get": OperationSpec(action="signin.policy.get", operation_id="signin_policy_get", method="GET", path="/sign-in/policy", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/sign-in/policy", path_params=())), + "signin.policy.inherit": OperationSpec(action="signin.policy.inherit", operation_id="signin_policy_inherit", method="DELETE", path="/sign-in/policy/organizations/{organization_id}", path_params=("organization_id",), scope="signin:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/organizations/{id}/inherit-sign-in-policy", path_params=("organization_id",))), + "signin.policy.update": OperationSpec(action="signin.policy.update", operation_id="signin_policy_update", method="PATCH", path="/sign-in/policy", path_params=(), scope="signin:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/sign-in/policy", path_params=())), + "signin.self_service_signup.set": OperationSpec(action="signin.self_service_signup.set", operation_id="signin_self_service_signup_set", method="PUT", path="/sign-in/self-service-signup", path_params=(), scope="signin:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/sign-in/self-service-signup", path_params=())), + "signin.sms.get": OperationSpec(action="signin.sms.get", operation_id="signin_sms_get", method="GET", path="/sign-in/sms", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/sign-in/sms", path_params=())), + "signin.sms.update": OperationSpec(action="signin.sms.update", operation_id="signin_sms_update", method="PATCH", path="/sign-in/sms", path_params=(), scope="signin:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/sign-in/sms", path_params=())), + "signin.social.delete": OperationSpec(action="signin.social.delete", operation_id="signin_social_delete", method="DELETE", path="/sign-in/social-providers/{id}", path_params=("id",), scope="signin:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/social-connections/{id}", path_params=("id",))), + "signin.social.disable": OperationSpec(action="signin.social.disable", operation_id="signin_social_disable", method="POST", path="/sign-in/social-providers/{id}/disable", path_params=("id",), scope="signin:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/social-connections/{id}/disable", path_params=("id",))), + "signin.social.enable": OperationSpec(action="signin.social.enable", operation_id="signin_social_enable", method="POST", path="/sign-in/social-providers/{id}/enable", path_params=("id",), scope="signin:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/social-connections/{id}/enable", path_params=("id",))), + "signin.social.inherit": OperationSpec(action="signin.social.inherit", operation_id="signin_social_inherit", method="PUT", path="/sign-in/social-providers/inherited/{provider}", path_params=("provider",), scope="signin:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/social-connections/inherit", path_params=(), query_params=(("provider", "provider"),))), + "signin.social.list": OperationSpec(action="signin.social.list", operation_id="signin_social_list", method="GET", path="/sign-in/social-providers", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/social-connections", path_params=(), pagination="cursor")), + "signin.social.offered": OperationSpec(action="signin.social.offered", operation_id="signin_social_offered", method="GET", path="/sign-in/social-providers/offered", path_params=(), scope="signin:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/social-connections/offered", path_params=())), + "signin.social.set": OperationSpec(action="signin.social.set", operation_id="signin_social_set", method="POST", path="/sign-in/social-providers", path_params=(), scope="signin:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/social-connections", path_params=())), + "signin.social.update": OperationSpec(action="signin.social.update", operation_id="signin_social_update", method="PATCH", path="/sign-in/social-providers/{id}", path_params=("id",), scope="signin:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/social-connections/{id}", path_params=("id",))), + "sod_policies.create": OperationSpec(action="sod_policies.create", operation_id="sod_policies_create", method="POST", path="/sod-policies", path_params=(), scope="governance:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/sod-policies", path_params=())), + "sod_policies.delete": OperationSpec(action="sod_policies.delete", operation_id="sod_policies_delete", method="DELETE", path="/sod-policies/{id}", path_params=("id",), scope="governance:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/sod-policies/{id}", path_params=("id",))), + "sod_policies.get": OperationSpec(action="sod_policies.get", operation_id="sod_policies_get", method="GET", path="/sod-policies/{id}", path_params=("id",), scope="governance:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/sod-policies/{id}", path_params=("id",))), + "sod_policies.list": OperationSpec(action="sod_policies.list", operation_id="sod_policies_list", method="GET", path="/sod-policies", path_params=(), scope="governance:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/sod-policies", path_params=(), pagination="cursor")), + "sod_policies.status.set": OperationSpec(action="sod_policies.status.set", operation_id="sod_policies_status_set", method="POST", path="/sod-policies/{id}/status", path_params=("id",), scope="governance:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/sod-policies/{id}/status", path_params=("id",))), + "sso.connections.activate": OperationSpec(action="sso.connections.activate", operation_id="sso_connections_activate", method="POST", path="/sso/connections/{id}/activate", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/sso-connections/{id}/activate", path_params=("id",))), + "sso.connections.certificates.activate": OperationSpec(action="sso.connections.certificates.activate", operation_id="sso_connections_certificates_activate", method="POST", path="/sso/connections/{id}/certificates/activate", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/sso-connections/{id}/activate-certificate", path_params=("id",))), + "sso.connections.certificates.list": OperationSpec(action="sso.connections.certificates.list", operation_id="sso_connections_certificates_list", method="GET", path="/sso/connections/{id}/certificates", path_params=("id",), scope="sso:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/sso-connections/{id}/certificates", path_params=("id",))), + "sso.connections.certificates.stage": OperationSpec(action="sso.connections.certificates.stage", operation_id="sso_connections_certificates_stage", method="POST", path="/sso/connections/{id}/certificates", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/sso-connections/{id}/certificates", path_params=("id",))), + "sso.connections.create": OperationSpec(action="sso.connections.create", operation_id="sso_connections_create", method="POST", path="/sso/connections", path_params=(), scope="sso:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/sso-connections", path_params=())), + "sso.connections.delete": OperationSpec(action="sso.connections.delete", operation_id="sso_connections_delete", method="DELETE", path="/sso/connections/{id}", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/sso-connections/{id}", path_params=("id",))), + "sso.connections.disable": OperationSpec(action="sso.connections.disable", operation_id="sso_connections_disable", method="POST", path="/sso/connections/{id}/disable", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/sso-connections/{id}/disable", path_params=("id",))), + "sso.connections.get": OperationSpec(action="sso.connections.get", operation_id="sso_connections_get", method="GET", path="/sso/connections/{id}", path_params=("id",), scope="sso:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/sso-connections/{id}", path_params=("id",))), + "sso.connections.list": OperationSpec(action="sso.connections.list", operation_id="sso_connections_list", method="GET", path="/sso/connections", path_params=(), scope="sso:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/sso-connections", path_params=(), pagination="cursor")), + "sso.connections.require_sso": OperationSpec(action="sso.connections.require_sso", operation_id="sso_connections_require_sso", method="POST", path="/sso/connections/{id}/require-sso", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/sso-connections/{id}/require-sso", path_params=("id",))), + "sso.connections.update": OperationSpec(action="sso.connections.update", operation_id="sso_connections_update", method="PATCH", path="/sso/connections/{id}", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/sso-connections/{id}", path_params=("id",))), + "sso.domains.capture": OperationSpec(action="sso.domains.capture", operation_id="sso_domains_capture", method="POST", path="/sso/domains/{id}/capture", path_params=("id",), scope="sso:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/organization-domains/{id}", path_params=("id",))), + "sso.domains.create": OperationSpec(action="sso.domains.create", operation_id="sso_domains_create", method="POST", path="/sso/domains", path_params=(), scope="sso:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/organization-domains", path_params=())), + "sso.domains.delete": OperationSpec(action="sso.domains.delete", operation_id="sso_domains_delete", method="DELETE", path="/sso/domains/{id}", path_params=("id",), scope="sso:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/organization-domains/{id}", path_params=("id",))), + "sso.domains.list": OperationSpec(action="sso.domains.list", operation_id="sso_domains_list", method="GET", path="/sso/domains", path_params=(), scope="sso:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/organization-domains", path_params=(), pagination="cursor")), + "sso.domains.verify": OperationSpec(action="sso.domains.verify", operation_id="sso_domains_verify", method="POST", path="/sso/domains/{id}/verify", path_params=("id",), scope="sso:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/organization-domains/{id}/verify", path_params=("id",))), + "sso.saml_metadata.import": OperationSpec(action="sso.saml_metadata.import", operation_id="sso_saml_metadata_import", method="POST", path="/sso/saml-metadata", path_params=(), scope="sso:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/saml-metadata-imports", path_params=())), + "support_sessions.end": OperationSpec(action="support_sessions.end", operation_id="support_sessions_end", method="DELETE", path="/support-sessions/{id}", path_params=("id",), scope="support:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/support-sessions/{id}", path_params=("id",))), + "support_sessions.start": OperationSpec(action="support_sessions.start", operation_id="support_sessions_start", method="POST", path="/support-sessions", path_params=(), scope="support:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/support-sessions", path_params=())), + "token_vault.grants.create": OperationSpec(action="token_vault.grants.create", operation_id="token_vault_grants_create", method="POST", path="/token-vault/secrets/{id}/grants", path_params=("id",), scope="token_vault:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/vault-secrets/{id}/grants", path_params=("id",))), + "token_vault.grants.delete": OperationSpec(action="token_vault.grants.delete", operation_id="token_vault_grants_delete", method="DELETE", path="/token-vault/secrets/{id}/grants/{client_id}", path_params=("id", "client_id"), scope="token_vault:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/vault-secret-grants/{id}", path_params=("client_id",), query_params=(("secret_id", "id"),))), + "token_vault.secrets.create": OperationSpec(action="token_vault.secrets.create", operation_id="token_vault_secrets_create", method="POST", path="/token-vault/secrets", path_params=(), scope="token_vault:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/vault-secrets", path_params=())), + "token_vault.secrets.get": OperationSpec(action="token_vault.secrets.get", operation_id="token_vault_secrets_get", method="GET", path="/token-vault/secrets/{id}", path_params=("id",), scope="token_vault:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/vault-secrets/{id}", path_params=("id",))), + "token_vault.secrets.list": OperationSpec(action="token_vault.secrets.list", operation_id="token_vault_secrets_list", method="GET", path="/token-vault/secrets", path_params=(), scope="token_vault:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/vault-secrets", path_params=(), pagination="cursor")), + "token_vault.secrets.revoke": OperationSpec(action="token_vault.secrets.revoke", operation_id="token_vault_secrets_revoke", method="POST", path="/token-vault/secrets/{id}/revoke", path_params=("id",), scope="token_vault:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/vault-secrets/{id}", path_params=("id",))), + "token_vault.secrets.rotate": OperationSpec(action="token_vault.secrets.rotate", operation_id="token_vault_secrets_rotate", method="POST", path="/token-vault/secrets/{id}/rotate", path_params=("id",), scope="token_vault:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/vault-secrets/{id}/rotate", path_params=("id",))), + "user_property_namespaces.configure": OperationSpec(action="user_property_namespaces.configure", operation_id="user_property_namespaces_configure", method="PUT", path="/user-property-namespaces/{name}", path_params=("name",), scope="user_property_namespaces:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PUT", path="/user-property-namespaces/{id}", path_params=("name",))), + "user_property_namespaces.show": OperationSpec(action="user_property_namespaces.show", operation_id="user_property_namespaces_show", method="GET", path="/user-property-namespaces/{name}", path_params=("name",), scope="user_property_namespaces:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/user-property-namespaces/{id}", path_params=("name",))), + "users.create": OperationSpec(action="users.create", operation_id="users_create", method="POST", path="/users", path_params=(), scope="users:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/users", path_params=())), + "users.deactivate": OperationSpec(action="users.deactivate", operation_id="users_deactivate", method="DELETE", path="/users/{id}", path_params=("id",), scope="users:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/users/{id}", path_params=("id",))), + "users.environment_roles.get": OperationSpec(action="users.environment_roles.get", operation_id="users_environment_roles_get", method="GET", path="/users/{id}/environment-roles/{role_id}", path_params=("id", "role_id"), scope="roles:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/environment-role-assignments/{id}", path_params=("role_id",), query_params=(("user_id", "id"),))), + "users.environment_roles.grant": OperationSpec(action="users.environment_roles.grant", operation_id="users_environment_roles_grant", method="PUT", path="/users/{id}/environment-roles/{role_id}", path_params=("id", "role_id"), scope="roles:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="PUT", path="/environment-role-assignments/{id}", path_params=("role_id",), query_params=(("user_id", "id"),))), + "users.environment_roles.list": OperationSpec(action="users.environment_roles.list", operation_id="users_environment_roles_list", method="GET", path="/users/{id}/environment-roles", path_params=("id",), scope="roles:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/users/{id}/environment-roles", path_params=("id",))), + "users.environment_roles.revoke": OperationSpec(action="users.environment_roles.revoke", operation_id="users_environment_roles_revoke", method="DELETE", path="/users/{id}/environment-roles/{role_id}", path_params=("id", "role_id"), scope="roles:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/environment-role-assignments/{id}", path_params=("role_id",), query_params=(("user_id", "id"),))), + "users.erase": OperationSpec(action="users.erase", operation_id="users_erase", method="POST", path="/users/{id}/erase", path_params=("id",), scope="users:erase", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/users/{id}/erase", path_params=("id",))), + "users.get": OperationSpec(action="users.get", operation_id="users_get", method="GET", path="/users/{id}", path_params=("id",), scope="users:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/users/{id}", path_params=("id",))), + "users.list": OperationSpec(action="users.list", operation_id="users_list", method="GET", path="/users", path_params=(), scope="users:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/users", path_params=(), pagination="cursor")), + "users.mfa.reset": OperationSpec(action="users.mfa.reset", operation_id="users_mfa_reset", method="DELETE", path="/users/{id}/mfa", path_params=("id",), scope="users:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/users/{id}/mfa", path_params=("id",))), + "users.mfa.sms.remove": OperationSpec(action="users.mfa.sms.remove", operation_id="users_mfa_sms_remove", method="DELETE", path="/users/{id}/mfa/sms", path_params=("id",), scope="users:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/users/{id}/sms-factor", path_params=("id",))), + "users.password.set": OperationSpec(action="users.password.set", operation_id="users_password_set", method="POST", path="/users/{id}/password", path_params=("id",), scope="users:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/users/{id}/password", path_params=("id",))), + "users.password_reset.send": OperationSpec(action="users.password_reset.send", operation_id="users_password_reset_send", method="POST", path="/users/{id}/password-reset", path_params=("id",), scope="users:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/users/{id}/password-reset", path_params=("id",))), + "users.reactivate": OperationSpec(action="users.reactivate", operation_id="users_reactivate", method="POST", path="/users/{id}/reactivate", path_params=("id",), scope="users:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/users/{id}/reactivate", path_params=("id",))), + "users.sessions.list": OperationSpec(action="users.sessions.list", operation_id="users_sessions_list", method="GET", path="/users/{id}/sessions", path_params=("id",), scope="users:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/users/{id}/sessions", path_params=("id",))), + "users.sessions.revoke": OperationSpec(action="users.sessions.revoke", operation_id="users_sessions_revoke", method="DELETE", path="/users/{id}/sessions/{session_id}", path_params=("id", "session_id"), scope="users:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/user-sessions/{id}", path_params=("session_id",), query_params=(("user_id", "id"),))), + "users.sessions.revoke_all": OperationSpec(action="users.sessions.revoke_all", operation_id="users_sessions_revoke_all", method="DELETE", path="/users/{id}/sessions", path_params=("id",), scope="users:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/users/{id}/sessions", path_params=("id",))), + "users.update": OperationSpec(action="users.update", operation_id="users_update", method="PATCH", path="/users/{id}", path_params=("id",), scope="users:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/users/{id}", path_params=("id",))), + "users.verification.send": OperationSpec(action="users.verification.send", operation_id="users_verification_send", method="POST", path="/users/{id}/verification", path_params=("id",), scope="users:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/users/{id}/verification", path_params=("id",))), + "users.verify": OperationSpec(action="users.verify", operation_id="users_verify", method="POST", path="/users/{id}/verify", path_params=("id",), scope="users:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/users/{id}/verify", path_params=("id",))), + "webhooks.create": OperationSpec(action="webhooks.create", operation_id="webhooks_create", method="POST", path="/webhooks", path_params=(), scope="webhooks:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/webhooks", path_params=())), + "webhooks.delete": OperationSpec(action="webhooks.delete", operation_id="webhooks_delete", method="DELETE", path="/webhooks/{id}", path_params=("id",), scope="webhooks:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/webhooks/{id}", path_params=("id",))), + "webhooks.get": OperationSpec(action="webhooks.get", operation_id="webhooks_get", method="GET", path="/webhooks/{id}", path_params=("id",), scope="webhooks:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/webhooks/{id}", path_params=("id",))), + "webhooks.list": OperationSpec(action="webhooks.list", operation_id="webhooks_list", method="GET", path="/webhooks", path_params=(), scope="webhooks:read", danger="read", approval=True, body=False, pagination="cursor", v1=V1Route(method="GET", path="/webhooks", path_params=(), pagination="cursor")), + "webhooks.pause": OperationSpec(action="webhooks.pause", operation_id="webhooks_pause", method="POST", path="/webhooks/{id}/pause", path_params=("id",), scope="webhooks:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/webhooks/{id}/pause", path_params=("id",))), + "webhooks.resume": OperationSpec(action="webhooks.resume", operation_id="webhooks_resume", method="POST", path="/webhooks/{id}/resume", path_params=("id",), scope="webhooks:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/webhooks/{id}/resume", path_params=("id",))), + "webhooks.secret.rotate": OperationSpec(action="webhooks.secret.rotate", operation_id="webhooks_secret_rotate", method="POST", path="/webhooks/{id}/rotate", path_params=("id",), scope="webhooks:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/webhooks/{id}/rotate", path_params=("id",))), + "webhooks.signature_scheme.change": OperationSpec(action="webhooks.signature_scheme.change", operation_id="webhooks_signature_scheme_change", method="POST", path="/webhooks/{id}/signature-scheme", path_params=("id",), scope="webhooks:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/webhooks/{id}/signature-scheme", path_params=("id",))), + "webhooks.update": OperationSpec(action="webhooks.update", operation_id="webhooks_update", method="PATCH", path="/webhooks/{id}", path_params=("id",), scope="webhooks:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/webhooks/{id}", path_params=("id",))), } diff --git a/src/cbox_id/management/generated/platform.py b/src/cbox_id/management/generated/platform.py index 7af82ac..20e2a23 100644 --- a/src/cbox_id/management/generated/platform.py +++ b/src/cbox_id/management/generated/platform.py @@ -1,4 +1,4 @@ -# GENERATED by scripts/generate_management.py from openapi/platform.yaml — do not edit. +# GENERATED by scripts/generate_management.py from openapi/platform.yaml and openapi/openapi.json — do not edit. # Regenerate with `python -m scripts.generate_management`. """Cbox ID — Operator API: typed client, schemas and operation table.""" @@ -10,7 +10,7 @@ from typing_extensions import NotRequired, TypedDict from ..client import ManagementClient -from ..models import ApiResponse, ApprovalMode, OperationSpec, PendingApprovalResult +from ..models import ApiResponse, ApprovalMode, OperationSpec, PendingApprovalResult, V1Route from ..transport import ManagementTransport # ── Schemas (components.schemas) ────────────────────────────────────────────────────────────────── @@ -170,16 +170,16 @@ class WorkspacesSetStatusBody(TypedDict): #: Every operation of the Cbox ID — Operator API, keyed by action name. PLATFORM_OPERATIONS: Mapping[str, OperationSpec] = { - "action_approvals.get": OperationSpec(action=None, operation_id=None, method="GET", path="/platform/action-approvals/{id}", path_params=("id",), scope=None, danger=None, approval=False, body=False, pagination=None), - "platform.environments.create": OperationSpec(action="platform.environments.create", operation_id="platform_environments_create", method="POST", path="/platform/environments", path_params=(), scope="operator:environments:write", danger="critical", approval=True, body=True, pagination=None), - "platform.environments.provision": OperationSpec(action="platform.environments.provision", operation_id="platform_environments_provision", method="POST", path="/platform/environments/{environment_id}/provision", path_params=("environment_id",), scope="operator:environments:write", danger="critical", approval=True, body=True, pagination=None), - "platform.operators.create": OperationSpec(action="platform.operators.create", operation_id="platform_operators_create", method="POST", path="/platform/operators", path_params=(), scope="operator:operators:write", danger="critical", approval=True, body=True, pagination=None), - "platform.operators.set_status": OperationSpec(action="platform.operators.set_status", operation_id="platform_operators_set_status", method="PUT", path="/platform/operators/{operator_id}/status", path_params=("operator_id",), scope="operator:operators:write", danger="critical", approval=True, body=True, pagination=None), - "platform.organizations.create": OperationSpec(action="platform.organizations.create", operation_id="platform_organizations_create", method="POST", path="/platform/environments/{environment_id}/organizations", path_params=("environment_id",), scope="operator:organizations:write", danger="critical", approval=True, body=True, pagination=None), - "platform.organizations.move": OperationSpec(action="platform.organizations.move", operation_id="platform_organizations_move", method="PUT", path="/platform/environments/{environment_id}/organizations/{organization_id}/parent", path_params=("environment_id", "organization_id"), scope="operator:organizations:write", danger="critical", approval=True, body=True, pagination=None), - "platform.organizations.set_status": OperationSpec(action="platform.organizations.set_status", operation_id="platform_organizations_set_status", method="PUT", path="/platform/environments/{environment_id}/organizations/{organization_id}/status", path_params=("environment_id", "organization_id"), scope="operator:organizations:write", danger="critical", approval=True, body=True, pagination=None), - "platform.workspaces.create": OperationSpec(action="platform.workspaces.create", operation_id="platform_workspaces_create", method="POST", path="/platform/workspaces", path_params=(), scope="operator:workspaces:write", danger="critical", approval=True, body=True, pagination=None), - "platform.workspaces.set_status": OperationSpec(action="platform.workspaces.set_status", operation_id="platform_workspaces_set_status", method="PUT", path="/platform/workspaces/{workspace_id}/status", path_params=("workspace_id",), scope="operator:workspaces:write", danger="critical", approval=True, body=True, pagination=None), + "action_approvals.get": OperationSpec(action=None, operation_id=None, method="GET", path="/platform/action-approvals/{id}", path_params=("id",), scope=None, danger=None, approval=False, body=False, pagination=None, v1=V1Route(method="GET", path="/admin/approvals/{id}", path_params=("id",))), + "platform.environments.create": OperationSpec(action="platform.environments.create", operation_id="platform_environments_create", method="POST", path="/platform/environments", path_params=(), scope="operator:environments:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/admin/environments", path_params=())), + "platform.environments.provision": OperationSpec(action="platform.environments.provision", operation_id="platform_environments_provision", method="POST", path="/platform/environments/{environment_id}/provision", path_params=("environment_id",), scope="operator:environments:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/admin/environments/{id}/provision", path_params=("environment_id",))), + "platform.operators.create": OperationSpec(action="platform.operators.create", operation_id="platform_operators_create", method="POST", path="/platform/operators", path_params=(), scope="operator:operators:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/admin/operators", path_params=())), + "platform.operators.set_status": OperationSpec(action="platform.operators.set_status", operation_id="platform_operators_set_status", method="PUT", path="/platform/operators/{operator_id}/status", path_params=("operator_id",), scope="operator:operators:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/admin/operators/{id}", path_params=("operator_id",))), + "platform.organizations.create": OperationSpec(action="platform.organizations.create", operation_id="platform_organizations_create", method="POST", path="/platform/environments/{environment_id}/organizations", path_params=("environment_id",), scope="operator:organizations:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/admin/organizations", path_params=(), query_params=(("environment_id", "environment_id"),))), + "platform.organizations.move": OperationSpec(action="platform.organizations.move", operation_id="platform_organizations_move", method="PUT", path="/platform/environments/{environment_id}/organizations/{organization_id}/parent", path_params=("environment_id", "organization_id"), scope="operator:organizations:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/admin/organizations/{id}", path_params=("organization_id",), query_params=(("environment_id", "environment_id"),))), + "platform.organizations.set_status": OperationSpec(action="platform.organizations.set_status", operation_id="platform_organizations_set_status", method="PUT", path="/platform/environments/{environment_id}/organizations/{organization_id}/status", path_params=("environment_id", "organization_id"), scope="operator:organizations:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/admin/organizations/{id}", path_params=("organization_id",), query_params=(("environment_id", "environment_id"),))), + "platform.workspaces.create": OperationSpec(action="platform.workspaces.create", operation_id="platform_workspaces_create", method="POST", path="/platform/workspaces", path_params=(), scope="operator:workspaces:write", danger="critical", approval=True, body=True, pagination=None, legacy_only=True), + "platform.workspaces.set_status": OperationSpec(action="platform.workspaces.set_status", operation_id="platform_workspaces_set_status", method="PUT", path="/platform/workspaces/{workspace_id}/status", path_params=("workspace_id",), scope="operator:workspaces:write", danger="critical", approval=True, body=True, pagination=None, legacy_only=True), } diff --git a/src/cbox_id/management/generated/workspace.py b/src/cbox_id/management/generated/workspace.py index bec8162..7d335c3 100644 --- a/src/cbox_id/management/generated/workspace.py +++ b/src/cbox_id/management/generated/workspace.py @@ -1,4 +1,4 @@ -# GENERATED by scripts/generate_management.py from openapi/workspace.yaml — do not edit. +# GENERATED by scripts/generate_management.py from openapi/workspace.yaml and openapi/openapi.json — do not edit. # Regenerate with `python -m scripts.generate_management`. """Cbox ID — Workspace Management API: typed client, schemas and operation table.""" @@ -10,7 +10,7 @@ from typing_extensions import NotRequired, TypedDict from ..client import ManagementClient -from ..models import ApiResponse, ApprovalMode, OperationSpec, PendingApprovalResult +from ..models import ApiResponse, ApprovalMode, OperationSpec, PendingApprovalResult, V1Route from ..transport import ManagementTransport # ── Schemas (components.schemas) ────────────────────────────────────────────────────────────────── @@ -322,37 +322,37 @@ class WorkspaceSettingsUpdateBody(TypedDict): #: Every operation of the Cbox ID — Workspace Management API, keyed by action name. WORKSPACE_OPERATIONS: Mapping[str, OperationSpec] = { - "action_approvals.get": OperationSpec(action=None, operation_id=None, method="GET", path="/workspace/action-approvals/{id}", path_params=("id",), scope=None, danger=None, approval=False, body=False, pagination=None), - "billing.account.update": OperationSpec(action="billing.account.update", operation_id="billing_account_update", method="PATCH", path="/workspace/billing/account", path_params=(), scope="billing:write", danger="write", approval=True, body=True, pagination=None), - "billing.payment_method.default": OperationSpec(action="billing.payment_method.default", operation_id="billing_payment_method_default", method="PATCH", path="/workspace/billing/payment-methods/{id}/default", path_params=("id",), scope="billing:write", danger="write", approval=True, body=False, pagination=None), - "billing.payment_method.remove": OperationSpec(action="billing.payment_method.remove", operation_id="billing_payment_method_remove", method="DELETE", path="/workspace/billing/payment-methods/{id}", path_params=("id",), scope="billing:write", danger="write", approval=True, body=False, pagination=None), - "environments.create": OperationSpec(action="environments.create", operation_id="environments_create", method="POST", path="/workspace/environments", path_params=(), scope="environments:write", danger="critical", approval=True, body=True, pagination=None), - "environments.domain.remove": OperationSpec(action="environments.domain.remove", operation_id="environments_domain_remove", method="DELETE", path="/workspace/environments/{environment_id}/domain", path_params=("environment_id",), scope="environments:write", danger="destructive", approval=True, body=False, pagination=None), - "environments.domain.request": OperationSpec(action="environments.domain.request", operation_id="environments_domain_request", method="POST", path="/workspace/environments/{environment_id}/domain", path_params=("environment_id",), scope="environments:write", danger="write", approval=True, body=True, pagination=None), - "environments.domain.verify": OperationSpec(action="environments.domain.verify", operation_id="environments_domain_verify", method="POST", path="/workspace/environments/{environment_id}/domain/verify", path_params=("environment_id",), scope="environments:write", danger="write", approval=True, body=False, pagination=None), - "environments.list": OperationSpec(action="environments.list", operation_id="environments_list", method="GET", path="/workspace/environments", path_params=(), scope="workspace:read", danger="read", approval=True, body=False, pagination="page"), - "keys.environment.create": OperationSpec(action="keys.environment.create", operation_id="keys_environment_create", method="POST", path="/workspace/environments/{environment_id}/keys", path_params=("environment_id",), scope="keys:write", danger="critical", approval=True, body=True, pagination=None), - "keys.environment.revoke": OperationSpec(action="keys.environment.revoke", operation_id="keys_environment_revoke", method="DELETE", path="/workspace/environments/{environment_id}/keys/{id}", path_params=("environment_id", "id"), scope="keys:write", danger="destructive", approval=True, body=False, pagination=None), - "keys.workspace.create": OperationSpec(action="keys.workspace.create", operation_id="keys_workspace_create", method="POST", path="/workspace/keys", path_params=(), scope="keys:write", danger="critical", approval=True, body=True, pagination=None), - "keys.workspace.list": OperationSpec(action="keys.workspace.list", operation_id="keys_workspace_list", method="GET", path="/workspace/keys", path_params=(), scope="workspace:read", danger="read", approval=True, body=False, pagination="page"), - "keys.workspace.revoke": OperationSpec(action="keys.workspace.revoke", operation_id="keys_workspace_revoke", method="DELETE", path="/workspace/keys/{id}", path_params=("id",), scope="keys:write", danger="destructive", approval=True, body=False, pagination=None), - "projects.create": OperationSpec(action="projects.create", operation_id="projects_create", method="POST", path="/workspace/projects", path_params=(), scope="projects:write", danger="write", approval=True, body=True, pagination=None), - "projects.list": OperationSpec(action="projects.list", operation_id="projects_list", method="GET", path="/workspace/projects", path_params=(), scope="workspace:read", danger="read", approval=True, body=False, pagination=None), - "projects.reactivate": OperationSpec(action="projects.reactivate", operation_id="projects_reactivate", method="POST", path="/workspace/projects/{id}/reactivate", path_params=("id",), scope="projects:write", danger="write", approval=True, body=False, pagination=None), - "projects.rename": OperationSpec(action="projects.rename", operation_id="projects_rename", method="PATCH", path="/workspace/projects/{id}", path_params=("id",), scope="projects:write", danger="write", approval=True, body=True, pagination=None), - "projects.suspend": OperationSpec(action="projects.suspend", operation_id="projects_suspend", method="POST", path="/workspace/projects/{id}/suspend", path_params=("id",), scope="projects:write", danger="write", approval=True, body=False, pagination=None), - "projects.verification.resend": OperationSpec(action="projects.verification.resend", operation_id="projects_verification_resend", method="POST", path="/workspace/projects/verification/resend", path_params=(), scope="projects:write", danger="write", approval=True, body=False, pagination=None), - "team.environment_access": OperationSpec(action="team.environment_access", operation_id="team_environment_access", method="PUT", path="/workspace/members/{id}/access", path_params=("id",), scope="team:write", danger="write", approval=True, body=True, pagination=None), - "team.invitations.list": OperationSpec(action="team.invitations.list", operation_id="team_invitations_list", method="GET", path="/workspace/invitations", path_params=(), scope="team:read", danger="read", approval=True, body=False, pagination=None), - "team.invitations.resend": OperationSpec(action="team.invitations.resend", operation_id="team_invitations_resend", method="POST", path="/workspace/invitations/{id}/resend", path_params=("id",), scope="team:write", danger="write", approval=True, body=False, pagination=None), - "team.invitations.revoke": OperationSpec(action="team.invitations.revoke", operation_id="team_invitations_revoke", method="DELETE", path="/workspace/invitations/{id}", path_params=("id",), scope="team:write", danger="destructive", approval=True, body=False, pagination=None), - "team.invite": OperationSpec(action="team.invite", operation_id="team_invite", method="POST", path="/workspace/members", path_params=(), scope="team:write", danger="write", approval=True, body=True, pagination=None), - "team.list": OperationSpec(action="team.list", operation_id="team_list", method="GET", path="/workspace/members", path_params=(), scope="team:read", danger="read", approval=True, body=False, pagination="page"), - "team.remove": OperationSpec(action="team.remove", operation_id="team_remove", method="DELETE", path="/workspace/members/{id}", path_params=("id",), scope="team:write", danger="destructive", approval=True, body=True, pagination=None), - "team.role": OperationSpec(action="team.role", operation_id="team_role", method="PATCH", path="/workspace/members/{id}/role", path_params=("id",), scope="team:write", danger="write", approval=True, body=True, pagination=None), - "team.transfer_ownership": OperationSpec(action="team.transfer_ownership", operation_id="team_transfer_ownership", method="POST", path="/workspace/members/{id}/transfer-ownership", path_params=("id",), scope="team:write", danger="critical", approval=True, body=False, pagination=None), - "workspace.get": OperationSpec(action="workspace.get", operation_id="workspace_get", method="GET", path="/workspace", path_params=(), scope="workspace:read", danger="read", approval=True, body=False, pagination=None), - "workspace.settings.update": OperationSpec(action="workspace.settings.update", operation_id="workspace_settings_update", method="PATCH", path="/workspace", path_params=(), scope="settings:write", danger="write", approval=True, body=True, pagination=None), + "action_approvals.get": OperationSpec(action=None, operation_id=None, method="GET", path="/workspace/action-approvals/{id}", path_params=("id",), scope=None, danger=None, approval=False, body=False, pagination=None, v1=V1Route(method="GET", path="/approvals/{id}", path_params=("id",))), + "billing.account.update": OperationSpec(action="billing.account.update", operation_id="billing_account_update", method="PATCH", path="/workspace/billing/account", path_params=(), scope="billing:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/billing-account", path_params=())), + "billing.payment_method.default": OperationSpec(action="billing.payment_method.default", operation_id="billing_payment_method_default", method="PATCH", path="/workspace/billing/payment-methods/{id}/default", path_params=("id",), scope="billing:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/payment-methods/{id}/make-default", path_params=("id",))), + "billing.payment_method.remove": OperationSpec(action="billing.payment_method.remove", operation_id="billing_payment_method_remove", method="DELETE", path="/workspace/billing/payment-methods/{id}", path_params=("id",), scope="billing:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/payment-methods/{id}", path_params=("id",))), + "environments.create": OperationSpec(action="environments.create", operation_id="environments_create", method="POST", path="/workspace/environments", path_params=(), scope="environments:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/environments", path_params=())), + "environments.domain.remove": OperationSpec(action="environments.domain.remove", operation_id="environments_domain_remove", method="DELETE", path="/workspace/environments/{environment_id}/domain", path_params=("environment_id",), scope="environments:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/environments/{id}/domain", path_params=("environment_id",))), + "environments.domain.request": OperationSpec(action="environments.domain.request", operation_id="environments_domain_request", method="POST", path="/workspace/environments/{environment_id}/domain", path_params=("environment_id",), scope="environments:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/environments/{id}/domain", path_params=("environment_id",))), + "environments.domain.verify": OperationSpec(action="environments.domain.verify", operation_id="environments_domain_verify", method="POST", path="/workspace/environments/{environment_id}/domain/verify", path_params=("environment_id",), scope="environments:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/environments/{id}/verify-domain", path_params=("environment_id",))), + "environments.list": OperationSpec(action="environments.list", operation_id="environments_list", method="GET", path="/workspace/environments", path_params=(), scope="workspace:read", danger="read", approval=True, body=False, pagination="page", v1=V1Route(method="GET", path="/environments", path_params=(), pagination="page")), + "keys.environment.create": OperationSpec(action="keys.environment.create", operation_id="keys_environment_create", method="POST", path="/workspace/environments/{environment_id}/keys", path_params=("environment_id",), scope="keys:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/environments/{id}/keys", path_params=("environment_id",))), + "keys.environment.revoke": OperationSpec(action="keys.environment.revoke", operation_id="keys_environment_revoke", method="DELETE", path="/workspace/environments/{environment_id}/keys/{id}", path_params=("environment_id", "id"), scope="keys:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/environment-keys/{id}", path_params=("id",), query_params=(("environment_id", "environment_id"),))), + "keys.workspace.create": OperationSpec(action="keys.workspace.create", operation_id="keys_workspace_create", method="POST", path="/workspace/keys", path_params=(), scope="keys:write", danger="critical", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/organization-keys", path_params=())), + "keys.workspace.list": OperationSpec(action="keys.workspace.list", operation_id="keys_workspace_list", method="GET", path="/workspace/keys", path_params=(), scope="workspace:read", danger="read", approval=True, body=False, pagination="page", v1=V1Route(method="GET", path="/organization-keys", path_params=(), pagination="page")), + "keys.workspace.revoke": OperationSpec(action="keys.workspace.revoke", operation_id="keys_workspace_revoke", method="DELETE", path="/workspace/keys/{id}", path_params=("id",), scope="keys:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/organization-keys/{id}", path_params=("id",))), + "projects.create": OperationSpec(action="projects.create", operation_id="projects_create", method="POST", path="/workspace/projects", path_params=(), scope="projects:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/projects", path_params=())), + "projects.list": OperationSpec(action="projects.list", operation_id="projects_list", method="GET", path="/workspace/projects", path_params=(), scope="workspace:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/projects", path_params=())), + "projects.reactivate": OperationSpec(action="projects.reactivate", operation_id="projects_reactivate", method="POST", path="/workspace/projects/{id}/reactivate", path_params=("id",), scope="projects:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/projects/{id}/reactivate", path_params=("id",))), + "projects.rename": OperationSpec(action="projects.rename", operation_id="projects_rename", method="PATCH", path="/workspace/projects/{id}", path_params=("id",), scope="projects:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/projects/{id}", path_params=("id",))), + "projects.suspend": OperationSpec(action="projects.suspend", operation_id="projects_suspend", method="POST", path="/workspace/projects/{id}/suspend", path_params=("id",), scope="projects:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/projects/{id}/suspend", path_params=("id",))), + "projects.verification.resend": OperationSpec(action="projects.verification.resend", operation_id="projects_verification_resend", method="POST", path="/workspace/projects/verification/resend", path_params=(), scope="projects:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/organization/resend-verification", path_params=())), + "team.environment_access": OperationSpec(action="team.environment_access", operation_id="team_environment_access", method="PUT", path="/workspace/members/{id}/access", path_params=("id",), scope="team:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/members/{id}", path_params=("id",))), + "team.invitations.list": OperationSpec(action="team.invitations.list", operation_id="team_invitations_list", method="GET", path="/workspace/invitations", path_params=(), scope="team:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/invitations", path_params=())), + "team.invitations.resend": OperationSpec(action="team.invitations.resend", operation_id="team_invitations_resend", method="POST", path="/workspace/invitations/{id}/resend", path_params=("id",), scope="team:write", danger="write", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/invitations/{id}/resend", path_params=("id",))), + "team.invitations.revoke": OperationSpec(action="team.invitations.revoke", operation_id="team_invitations_revoke", method="DELETE", path="/workspace/invitations/{id}", path_params=("id",), scope="team:write", danger="destructive", approval=True, body=False, pagination=None, v1=V1Route(method="DELETE", path="/invitations/{id}", path_params=("id",))), + "team.invite": OperationSpec(action="team.invite", operation_id="team_invite", method="POST", path="/workspace/members", path_params=(), scope="team:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="POST", path="/members", path_params=())), + "team.list": OperationSpec(action="team.list", operation_id="team_list", method="GET", path="/workspace/members", path_params=(), scope="team:read", danger="read", approval=True, body=False, pagination="page", v1=V1Route(method="GET", path="/members", path_params=(), pagination="page")), + "team.remove": OperationSpec(action="team.remove", operation_id="team_remove", method="DELETE", path="/workspace/members/{id}", path_params=("id",), scope="team:write", danger="destructive", approval=True, body=True, pagination=None, v1=V1Route(method="DELETE", path="/members/{id}", path_params=("id",))), + "team.role": OperationSpec(action="team.role", operation_id="team_role", method="PATCH", path="/workspace/members/{id}/role", path_params=("id",), scope="team:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/members/{id}", path_params=("id",))), + "team.transfer_ownership": OperationSpec(action="team.transfer_ownership", operation_id="team_transfer_ownership", method="POST", path="/workspace/members/{id}/transfer-ownership", path_params=("id",), scope="team:write", danger="critical", approval=True, body=False, pagination=None, v1=V1Route(method="POST", path="/members/{id}/transfer-ownership", path_params=("id",))), + "workspace.get": OperationSpec(action="workspace.get", operation_id="workspace_get", method="GET", path="/workspace", path_params=(), scope="workspace:read", danger="read", approval=True, body=False, pagination=None, v1=V1Route(method="GET", path="/organization", path_params=())), + "workspace.settings.update": OperationSpec(action="workspace.settings.update", operation_id="workspace_settings_update", method="PATCH", path="/workspace", path_params=(), scope="settings:write", danger="write", approval=True, body=True, pagination=None, v1=V1Route(method="PATCH", path="/organization", path_params=())), } diff --git a/src/cbox_id/management/models.py b/src/cbox_id/management/models.py index 5e9f0b6..a0e2738 100644 --- a/src/cbox_id/management/models.py +++ b/src/cbox_id/management/models.py @@ -28,6 +28,31 @@ T = TypeVar("T") +@dataclass(frozen=True, slots=True) +class V1Route: + """Where an operation lives on Cbox ID's ``/v1`` API (``https://api.cboxid.com/v1``). + + Used only when a client is given ``api_url``. The ``/v1`` API addresses a child object + directly (``DELETE /v1/organization-memberships/{id}?organization_id=…`` rather than + ``DELETE /organizations/{organization_id}/members/{user_id}``), so some of an + operation's own path parameters move: into the ``/v1`` path, the query string or the + JSON body. The method keeps taking them in the same order either way. + """ + + method: HttpMethod + #: Path relative to ``/v1``, with ``{param}`` placeholders. + path: str + #: The operation's own path parameter names that fill the ``/v1`` placeholders, in order. + path_params: tuple[str, ...] + #: ``(name on /v1, own name)`` for each own path parameter the ``/v1`` route takes in + #: the query string, e.g. ``("app_id", "id")``: the app is the parent, named in the query. + query_params: tuple[tuple[str, str], ...] = () + #: ``(name on /v1, own name)`` for each own path parameter the ``/v1`` route takes in the + #: JSON body. + body_params: tuple[tuple[str, str], ...] = () + pagination: Pagination | None = None + + @dataclass(frozen=True, slots=True) class OperationSpec: """What the generator knows about one operation. @@ -53,6 +78,12 @@ class OperationSpec: #: Whether the input travels as a JSON body (otherwise as the query string). body: bool pagination: Pagination | None + #: The same operation on the ``/v1`` API, for a client given ``api_url``. ``None`` on an + #: operation you build yourself: its ``path`` is then taken as relative to ``/v1``. + v1: V1Route | None = None + #: True when the operation has no ``/v1`` counterpart: it only works on + #: ``{host}/api/v1``, so a client given ``api_url`` refuses it. + legacy_only: bool = False @dataclass(frozen=True, slots=True) @@ -80,11 +111,17 @@ class ApprovalContext: @dataclass(frozen=True) class ApiResponse(Generic[T]): - """A successful answer. ``data`` is the envelope's ``data``; ``body`` is the whole document.""" + """A successful answer. ``data`` is the envelope's ``data``; ``body`` is the whole document. + + On the ``/v1`` API (a client given ``api_url``) a single object is not wrapped, so + ``data`` is the object itself; a list's ``data`` is its items and ``meta`` holds the rest + (``has_more``, ``next_cursor``). + """ status: int data: T - #: The envelope's ``meta`` (paging, on lists), when there is one. + #: The envelope's ``meta`` (paging, on lists), when there is one. On the ``/v1`` API, a + #: list's fields besides ``data``: ``object``, ``has_more`` and ``next_cursor``. meta: dict[str, Any] | None body: Any #: True when the server answered from its idempotency store (``Idempotent-Replayed: diff --git a/src/cbox_id/management/organization.py b/src/cbox_id/management/organization.py new file mode 100644 index 0000000..191e4cc --- /dev/null +++ b/src/cbox_id/management/organization.py @@ -0,0 +1,29 @@ +"""The organization plane under its Cbox ID v3 name.""" + +from __future__ import annotations + +from .generated.workspace import WorkspaceClient, WorkspaceMethods +from .transport import ManagementTransport + + +class OrganizationClient(WorkspaceClient): + """Cbox ID — the organization plane: the customer's own Cbox account, above every + environment it owns, with its projects, environments, members and keys. + + Cbox ID calls the account an organization; this SDK called it a workspace. This is + :class:`WorkspaceClient` under its new name, so code typed against the old name accepts + it, and every method is the same. ``client.organization`` is ``client.workspace``. + + Takes a ``cbid_org_…`` key (a ``cbid_ws_…`` key keeps working) or a person's root access + token:: + + org = OrganizationClient(api_url="https://api.cboxid.com", api_key="cbid_org_…") + org.organization.get() + """ + + #: The organization itself (get, settings): the same namespace as ``workspace``. + organization: WorkspaceMethods + + def _bind(self, core: ManagementTransport) -> None: + super()._bind(core) + self.organization = self.workspace diff --git a/src/cbox_id/management/transport.py b/src/cbox_id/management/transport.py index da807eb..b7adc66 100644 --- a/src/cbox_id/management/transport.py +++ b/src/cbox_id/management/transport.py @@ -62,6 +62,14 @@ "account": "/me", } +#: Where each plane polls an approval on the ``/v1`` API (``api_url``), relative to ``/v1``. +_V1_APPROVALS: dict[str, str] = { + "environment": "/approvals", + "workspace": "/approvals", + "platform": "/admin/approvals", + "account": "/me/approvals", +} + _WRITE_METHODS = frozenset({"POST", "PUT", "PATCH", "DELETE"}) #: How many approvals one call will go through before giving up (a policy loop guard). @@ -107,22 +115,22 @@ def retry_after_seconds(headers: httpx.Headers) -> float | None: return max(0.0, (when - datetime.now(timezone.utc)).total_seconds()) -def _normalize_base_url(raw: str) -> str: +def _normalize_base_url(raw: str, option: str = "base_url", version: str = "/api/v1") -> str: parts = urlsplit(raw) if parts.scheme == "" or parts.hostname is None: - raise ConfigurationError("Management client `base_url` is not a valid URL.") + raise ConfigurationError(f"Management client `{option}` is not a valid URL.") loopback = parts.hostname in _LOOPBACK if parts.scheme != "https" and not (parts.scheme == "http" and loopback): # Every request carries a management credential. Over http a network attacker reads it. raise ConfigurationError( - f"Management client `base_url` must be https (got {parts.scheme}://{parts.hostname})." + f"Management client `{option}` must be https (got {parts.scheme}://{parts.hostname})." ) path = parts.path.rstrip("/") - path = path if path.endswith("/api/v1") else f"{path}/api/v1" + path = path if path.endswith(version) else f"{path}{version}" return f"{parts.scheme}://{parts.netloc}{path}" @@ -172,6 +180,13 @@ def _read_json(response: httpx.Response) -> Any: return None +def _path_value(op: OperationSpec, name: str, value: object) -> str: + if not isinstance(value, str) or value == "": + raise TypeError(f"{op.action or op.path}: missing path parameter `{name}`.") + + return value + + @dataclass(frozen=True, slots=True) class _Held: approval: PendingApproval @@ -202,6 +217,7 @@ def __init__( plane: Plane, *, base_url: str | None = None, + api_url: str | None = None, api_key: str | None = None, access_token: AccessToken | None = None, environment: str | None = None, @@ -214,7 +230,14 @@ def __init__( transport: httpx.BaseTransport | None = None, http_client: httpx.Client | None = None, ) -> None: - if base_url is None or base_url == "": + v1 = api_url is not None and api_url != "" + + if v1 and base_url: + raise ConfigurationError( + "Pass `base_url` (a host's /api/v1) or `api_url` (the /v1 API), not both." + ) + + if not v1 and (base_url is None or base_url == ""): raise ConfigurationError( f"The {plane} management client needs a `base_url` (the environment's own host)." ) @@ -264,12 +287,22 @@ def __init__( if has_key: raise ConfigurationError( "`environment` names the environment for a root access token. A " + "`cbid_env_…` key is bound to its own environment: leave `environment` " + "out." + if v1 + else "`environment` names the environment for a root access token. A " "`cbid_env_…` key is bound to its own environment's host: use that host " "as `base_url` instead." ) self.plane: Plane = plane - self.base_url = _normalize_base_url(base_url) + #: True when the client calls the ``/v1`` API (``api_url``), with its paths and shapes. + self.v1 = v1 + self.base_url = ( + _normalize_base_url(api_url, "api_url", "/v1") + if v1 and api_url is not None + else _normalize_base_url(base_url or "") + ) self._api_key = api_key self._access_token = access_token self._environment = environment @@ -333,15 +366,27 @@ def call( headers: Mapping[str, str] | None = None, ) -> ApiResponse[Any] | PendingApprovalResult[Any]: """Run one operation. Generated methods call this; so can you, with an OperationSpec.""" - url = self._url(op, path_args) + method, url, moved_query, moved_body = self._target(op, path_args) params = None if op.body or not isinstance(input, Mapping) else _query_pairs(input) - key = (idempotency_key or str(uuid.uuid4())) if op.method in _WRITE_METHODS else None + params = [*(params or []), *moved_query] + payload = input if op.body else None + has_body = op.body and input is not None + + if moved_body: + # A parent the /v1 route takes in the body: the path argument is the authority. + if payload is not None and not isinstance(payload, Mapping): + raise TypeError(f"{op.action or op.path}: the body must be a mapping on /v1.") + + payload = {**(payload or {}), **moved_body} + has_body = True + + key = (idempotency_key or str(uuid.uuid4())) if method in _WRITE_METHODS else None request = _Request( - method=op.method, + method=method, url=url, params=tuple(params) if params else None, - payload=input if op.body else None, - has_body=op.body and input is not None, + payload=payload, + has_body=has_body, idempotency_key=key, headers=headers, ) @@ -376,9 +421,11 @@ def paginate( """Every item of a paged list, fetching pages as the iteration reaches them. Works for both cursor (``after`` / ``meta.next_cursor``) and numbered (``page`` / - ``meta.next_page``) lists. + ``meta.next_page``) lists, and for the ``/v1`` list envelope (``has_more`` / + ``next_cursor``). """ current: dict[str, Any] = dict(query or {}) + pagination = op.v1.pagination if self.v1 and op.v1 is not None else op.pagination while True: page = self.call(op, path_args, current, headers=headers) @@ -391,7 +438,7 @@ def paginate( if not items or meta.get("has_more") is not True: return - if op.pagination == "page": + if pagination == "page": raw = current.get("page", 1) number = raw if isinstance(raw, int) else int(str(raw)) next_page = meta.get("next_page") @@ -446,7 +493,8 @@ def request( ) -> ApiResponse[Any] | PendingApprovalResult[Any]: """Call a route the generated surface does not cover. ``path`` is relative to ``/api/v1``. - Writes get an ``Idempotency-Key`` and the approval loop like any operation. + With ``api_url``, ``path`` is relative to ``/v1`` instead. Writes get an + ``Idempotency-Key`` and the approval loop like any operation. """ op = OperationSpec( action=None, @@ -473,19 +521,43 @@ def request( # ── Internals ──────────────────────────────────────────────────────────────────────── - def _url(self, op: OperationSpec, path_args: Sequence[str]) -> str: + def _target( + self, op: OperationSpec, path_args: Sequence[str] + ) -> tuple[str, str, list[tuple[str, str]], dict[str, str]]: + """The method and URL to call, plus the path arguments the /v1 route moved. + + Without ``api_url`` this is ``op`` exactly as it always was. + """ + if not self.v1 or op.v1 is None: + if self.v1 and op.legacy_only: + raise ConfigurationError( + f"{op.action or op.path} has no /v1 route; call it on a client without " + "`api_url`." + ) + + return op.method, self._url(op.path, path_args, op), [], {} + + route = op.v1 + given = list(path_args) + values: dict[str, str] = {} + + for name in op.path_params: + values[name] = _path_value(op, name, given.pop(0) if given else "") + + url = self._url(route.path, [values[name] for name in route.path_params], op) + query = [(wire, values[name]) for wire, name in route.query_params] + body = {wire: values[name] for wire, name in route.body_params} + + return route.method, url, query, body + + def _url(self, path: str, path_args: Sequence[str], op: OperationSpec) -> str: args = list(path_args) - path = op.path start = 0 while (open_at := path.find("{", start)) != -1: close_at = path.index("}", open_at) name = path[open_at + 1 : close_at] - value = args.pop(0) if args else "" - - if not isinstance(value, str) or value == "": - raise TypeError(f"{op.action or op.path}: missing path parameter `{name}`.") - + value = _path_value(op, name, args.pop(0) if args else "") encoded = quote(value, safe="") path = f"{path[:open_at]}{encoded}{path[close_at + 1 :]}" start = open_at + len(encoded) @@ -619,10 +691,17 @@ def _held_approval(self, response: httpx.Response) -> _Held | None: body = _read_json(response) - if not isinstance(body, dict) or body.get("error") != "approval_required": + if not isinstance(body, dict): return None - approval = body.get("approval") + # /v1 answers with the approval itself (`object: "approval"`); /api/v1 wraps it. + approval = ( + body + if self.v1 and body.get("object") == "approval" + else body.get("approval") + if body.get("error") == "approval_required" + else None + ) if not isinstance(approval, dict): return None @@ -636,8 +715,12 @@ def text(name: str, default: str) -> str: value = approval.get(name) return value if isinstance(value, str) else default - mount = _APPROVAL_MOUNT[self.plane] - fallback = f"{self.base_url}{mount}/action-approvals/{quote(approval_id, safe='')}" + mount = ( + _V1_APPROVALS[self.plane] + if self.v1 + else f"{_APPROVAL_MOUNT[self.plane]}/action-approvals" + ) + fallback = f"{self.base_url}{mount}/{quote(approval_id, safe='')}" return _Held( approval=PendingApproval( @@ -703,6 +786,8 @@ def _await_approval(self, approval: PendingApproval, initial_delay: float | None body = _read_json(response) data = body.get("data") if isinstance(body, dict) else None + # /api/v1 wraps the approval in `data`; /v1 answers with the object itself. + data = data if isinstance(data, dict) or not self.v1 else body status = data.get("status") if isinstance(data, dict) else None if status == "approved": @@ -729,6 +814,10 @@ def _result(self, response: httpx.Response, idempotency_key: str | None) -> ApiR raise self._error(response) body = None if response.status_code == 204 else _read_json(response) + + if self.v1: + return self._v1_result(response, body, idempotency_key) + envelope = isinstance(body, dict) and "data" in body meta = body.get("meta") if isinstance(body, dict) and envelope else None @@ -743,19 +832,44 @@ def _result(self, response: httpx.Response, idempotency_key: str | None) -> ApiR headers=response.headers, ) + def _v1_result( + self, response: httpx.Response, body: Any, idempotency_key: str | None + ) -> ApiResponse[Any]: + """A ``/v1`` answer: a list is ``{object: "list", data, has_more, next_cursor}``; an + object is not wrapped at all, so ``data`` is the object itself.""" + listed = isinstance(body, dict) and body.get("object") == "list" and "data" in body + + return ApiResponse( + status=response.status_code, + data=body["data"] if listed else body, + meta={k: v for k, v in body.items() if k != "data"} if listed else None, + body=body, + replayed=response.headers.get("idempotent-replayed", "").lower() == "true", + idempotency_key=idempotency_key, + request_id=response.headers.get("x-request-id"), + headers=response.headers, + ) + def _error(self, response: httpx.Response) -> CboxIdApiError: body = _read_json(response) fields: dict[str, Any] = body if isinstance(body, dict) else {} code = fields.get("error") code = code if isinstance(code, str) else f"http_{response.status_code}" - # A bearer challenge (RFC 6750) says `error_description`, the management envelope `message`. - message = fields.get("message") - - if not isinstance(message, str): - description = fields.get("error_description") - message = ( - description if isinstance(description, str) else f"HTTP {response.status_code}" - ) + # A bearer challenge (RFC 6750) says `error_description`, the management envelope + # `message`, and the /v1 API's RFC 9457 problem `detail` (or at least `title`). + message = next( + ( + value + for value in ( + fields.get("message"), + fields.get("error_description"), + fields.get("detail"), + fields.get("title"), + ) + if isinstance(value, str) + ), + f"HTTP {response.status_code}", + ) errors: dict[str, list[str]] = {} raw_errors = fields.get("errors") diff --git a/src/cbox_id/models.py b/src/cbox_id/models.py index 8559e64..8b35d0b 100644 --- a/src/cbox_id/models.py +++ b/src/cbox_id/models.py @@ -23,6 +23,10 @@ class CboxIdConfig: account_path: str = "/account" timeout_seconds: float = 10.0 cache_ttl_seconds: float = 3600.0 + # Cbox ID's /v1 API (`https://api.cboxid.com`, with or without `/v1`). Unset, the + # manifest push and Pipes leases go to `{issuer}/api/v1` exactly as before; set, they go + # to `{api_url}/v1` with its paths. Sign-in and every `/oauth/*` call stay on the issuer. + api_url: str | None = None class AuthorizationPrompt(str, Enum): diff --git a/src/cbox_id/pipes.py b/src/cbox_id/pipes.py index 9afdfa6..7827576 100644 --- a/src/cbox_id/pipes.py +++ b/src/cbox_id/pipes.py @@ -15,6 +15,7 @@ import httpx +from ._api import v1_base_url from .errors import ( PipeLeaseDeniedError, PipeLeaseError, @@ -101,8 +102,11 @@ def __init__( client_id: str | None = None, http_client: httpx.Client | None = None, timeout: float = 10.0, + api_url: str | None = None, ) -> None: self._issuer = issuer.rstrip("/") + #: `{api_url}/v1` when leasing from the /v1 API (`POST /v1/pipe-leases`). + self._v1 = v1_base_url(api_url) if api_url else None self._access_token = access_token self._client_id = client_id self._http = http_client or httpx.Client(timeout=timeout) @@ -132,8 +136,15 @@ def lease_token( if user_id is not None: payload["user_id"] = user_id + if self._v1 is not None: + # On the /v1 API a lease is a resource of its own, with the provider in the body. + url = f"{self._v1}/pipe-leases" + payload = {"provider": str(provider), **payload} + else: + url = f"{self._issuer}/api/v1/vault/pipes/{quote(provider, safe='')}/token" + response = self._http.post( - f"{self._issuer}/api/v1/vault/pipes/{quote(provider, safe='')}/token", + url, json=payload, headers={"Authorization": f"Bearer {token}", "Accept": "application/json"}, ) @@ -181,7 +192,8 @@ def connect_url(self, provider: PipeProvider | str, *, return_to: str | None = N def _lease_error(response: httpx.Response, body: dict[str, Any]) -> PipeLeaseError: status = response.status_code error = body.get("error") if isinstance(body.get("error"), str) else None - raw_message = body.get("message") + # `message` from /api/v1; an RFC 9457 problem's `detail` from /v1. + raw_message = body.get("message") or body.get("detail") message = ( raw_message if isinstance(raw_message, str) and raw_message diff --git a/tests/test_id_v3.py b/tests/test_id_v3.py new file mode 100644 index 0000000..4a12000 --- /dev/null +++ b/tests/test_id_v3.py @@ -0,0 +1,535 @@ +"""Cbox ID v3, additively: the /v1 API on `api_url`, organization naming, prefixed ids and the +`id.*` event names. Without `api_url` every call is the one 0.12.0 made (test_management).""" + +from __future__ import annotations + +import json +from typing import Any +from urllib.parse import parse_qsl, urlsplit + +import httpx +import pytest + +from cbox_id import ( + AuthzManifest, + CboxIdClient, + CboxIdConfig, + ConfigurationError, + PipeNotConnectedError, + PipesClient, + current_event_name, + event_name_aliases, + is_prefixed_id, + legacy_event_name, + raw_id, + same_event, + same_id, +) +from cbox_id.management import ( + ENVIRONMENT_OPERATIONS, + PLATFORM_OPERATIONS, + WORKSPACE_OPERATIONS, + CboxIdApiError, + EnvironmentClient, + OrganizationClient, + PlatformClient, + RetryOptions, + WorkspaceClient, +) + +from .management_helpers import FakeApi, json_response + +API_URL = "https://api.cboxid.com" +V1 = f"{API_URL}/v1" +KEY = "cbid_env_test_key" +ULID = "01J9ZK3M4N5P6Q7R8S9T0VWXYZ" + + +def v1_env(fake: FakeApi, **options: Any) -> EnvironmentClient: + settings: dict[str, Any] = { + "api_url": API_URL, + "api_key": KEY, + "transport": fake.transport, + "retry": RetryOptions(base_delay=0), + "approval_poll_interval": 0, + **options, + } + return EnvironmentClient(**settings) + + +def query(url: str) -> dict[str, str]: + return dict(parse_qsl(urlsplit(url).query)) + + +# ── Where the calls go ────────────────────────────────────────────────────────────────────── + + +@pytest.mark.parametrize("given", [API_URL, f"{API_URL}/", f"{API_URL}/v1", f"{API_URL}/v1/"]) +def test_api_url_is_the_v1_api_with_or_without_its_version(given: str) -> None: + client = EnvironmentClient(api_url=given, api_key=KEY) + + assert client.base_url == V1 + assert client.core.v1 is True + + +def test_without_api_url_nothing_changes() -> None: + assert EnvironmentClient(base_url="https://acme.test", api_key=KEY).base_url == ( + "https://acme.test/api/v1" + ) + assert WorkspaceClient(api_key="cbid_ws_k").base_url == "https://api.cboxid.com/api/v1" + assert EnvironmentClient(base_url="https://acme.test", api_key=KEY).core.v1 is False + + +def test_api_url_replaces_the_default_base_url_of_the_root_planes() -> None: + assert WorkspaceClient(api_url=API_URL, api_key="cbid_ws_k").base_url == V1 + assert PlatformClient(api_url=API_URL, access_token="t").base_url == V1 + + +def test_api_url_and_base_url_together_are_refused() -> None: + with pytest.raises(ConfigurationError, match="not both"): + EnvironmentClient(base_url="https://acme.test", api_url=API_URL, api_key=KEY) + + +def test_api_url_must_be_https() -> None: + with pytest.raises(ConfigurationError, match="`api_url` must be https"): + EnvironmentClient(api_url="http://api.cboxid.com", api_key=KEY) + + assert EnvironmentClient(api_url="http://localhost:8000", api_key=KEY).base_url == ( + "http://localhost:8000/v1" + ) + + +def test_a_root_token_names_its_environment_on_v1_too() -> None: + fake = FakeApi(json_response({"object": "app", "id": "app_1"})) + client = v1_env(fake, api_key=None, access_token="root-token", environment="acme") + + client.apps.get("app_1") + + assert fake.calls[0].url == f"{V1}/apps/app_1" + assert fake.calls[0].headers["cbox-environment"] == "acme" + + +def test_a_key_still_names_no_environment_on_v1() -> None: + with pytest.raises(ConfigurationError, match="bound to its own environment"): + EnvironmentClient(api_url=API_URL, api_key=KEY, environment="acme") + + +# ── Paths ─────────────────────────────────────────────────────────────────────────────────── + + +def test_an_operation_keeps_its_method_and_takes_its_v1_path() -> None: + fake = FakeApi(json_response({"object": "app", "id": "app_1", "name": "Acme"})) + + v1_env(fake).apps.get("app_1") + + assert fake.calls[0].method == "GET" + assert fake.calls[0].url == f"{V1}/apps/app_1" + assert fake.calls[0].headers["authorization"] == f"Bearer {KEY}" + + +def test_a_child_is_addressed_directly_and_its_parent_named_in_the_query() -> None: + fake = FakeApi(httpx.Response(204)) + + v1_env(fake).members.remove("org_1", "usr_1") + + call = fake.calls[0] + assert call.method == "DELETE" + assert urlsplit(call.url).path == "/v1/organization-memberships/usr_1" + assert query(call.url) == {"organization_id": "org_1"} + + +def test_a_parent_named_id_is_renamed_in_the_query_and_the_body_still_travels() -> None: + fake = FakeApi(json_response({"object": "access_review_item", "id": "item_1"})) + + v1_env(fake).access_reviews.items.decide("rev_1", "item_1", {"decision": "certify"}) + + call = fake.calls[0] + assert call.method == "POST" + assert urlsplit(call.url).path == "/v1/access-review-items/item_1/decide" + assert query(call.url) == {"access_review_id": "rev_1"} + assert call.body == {"decision": "certify"} + + +def test_a_parent_the_v1_route_takes_in_the_body_is_sent_there() -> None: + fake = FakeApi(httpx.Response(204)) + + v1_env(fake).organizations.domains.remove("org_1", "dom_1") + + call = fake.calls[0] + assert call.method == "DELETE" + assert call.url == f"{V1}/organization-domains/dom_1" + assert call.body == {"organization_id": "org_1"} + + +def test_a_changed_method_follows_the_v1_route() -> None: + fake = FakeApi(json_response({"object": "organization_domain", "id": "dom_1"})) + + v1_env(fake).organizations.domains.capture("org_1", "dom_1", {"capture": True}) + + call = fake.calls[0] + assert ENVIRONMENT_OPERATIONS["organizations.domains.capture"].method == "PUT" + assert call.method == "PATCH" + assert call.url == f"{V1}/organization-domains/dom_1" + assert call.body == {"capture": True, "organization_id": "org_1"} + + +def test_the_organization_plane_moves_to_its_own_v1_resources() -> None: + fake = FakeApi( + json_response({"object": "organization", "id": "org_1", "name": "Acme"}), + httpx.Response(204), + ) + client = OrganizationClient( + api_url=API_URL, api_key="cbid_org_k", transport=fake.transport, retry=RetryOptions(0) + ) + + org = client.organization.get() + client.keys.environment.revoke("env_1", "ekey_1") + + assert fake.calls[0].url == f"{V1}/organization" + assert org.data == {"object": "organization", "id": "org_1", "name": "Acme"} + assert fake.calls[0].headers["authorization"] == "Bearer cbid_org_k" + assert urlsplit(fake.calls[1].url).path == "/v1/environment-keys/ekey_1" + assert query(fake.calls[1].url) == {"environment_id": "env_1"} + + +def test_an_operation_without_a_v1_route_is_refused_before_any_request() -> None: + fake = FakeApi() + client = PlatformClient(api_url=API_URL, access_token="t", transport=fake.transport) + + assert PLATFORM_OPERATIONS["platform.workspaces.create"].legacy_only + + with pytest.raises(ConfigurationError, match="no /v1 route"): + client.workspaces.create({"name": "Acme", "owner_email": "a@acme.test"}) # type: ignore[typeddict-item] + + assert fake.calls == [] + + +def test_every_generated_operation_knows_its_v1_route() -> None: + for table in (ENVIRONMENT_OPERATIONS, WORKSPACE_OPERATIONS, PLATFORM_OPERATIONS): + for key, op in table.items(): + assert op.v1 is not None or op.legacy_only, key + + +def test_request_takes_a_path_relative_to_v1() -> None: + fake = FakeApi(json_response({"object": "list", "data": [], "has_more": False})) + + v1_env(fake).request("GET", "/sod-policies", query={"limit": 5}) + + assert fake.calls[0].url == f"{V1}/sod-policies?limit=5" + + +# ── Shapes ────────────────────────────────────────────────────────────────────────────────── + + +def test_an_object_is_not_wrapped_so_data_is_the_object() -> None: + # An object may well have a field called `data`: it stays the object's field. + body = {"object": "event", "id": "idevt_1", "data": {"user_id": "usr_1"}} + fake = FakeApi(json_response(body)) + + result = v1_env(fake).request("GET", "/events/idevt_1") + + assert result.data == body + assert result.meta is None + + +def test_a_list_envelope_gives_its_items_and_the_paging_fields() -> None: + fake = FakeApi( + json_response( + {"object": "list", "data": [{"id": "usr_1"}], "has_more": True, "next_cursor": "c2"} + ) + ) + + result = v1_env(fake).users.list() + + assert result.data == [{"id": "usr_1"}] + assert result.meta == {"object": "list", "has_more": True, "next_cursor": "c2"} + + +def test_paging_follows_next_cursor_as_after() -> None: + fake = FakeApi( + json_response( + {"object": "list", "data": [{"id": "usr_1"}], "has_more": True, "next_cursor": "c2"} + ), + json_response({"object": "list", "data": [{"id": "usr_2"}], "has_more": False}), + ) + + ids = [user["id"] for user in v1_env(fake).users.list_all({"limit": 1})] + + assert ids == ["usr_1", "usr_2"] + assert query(fake.calls[1].url) == {"limit": "1", "after": "c2"} + + +def test_a_problem_document_becomes_the_same_typed_error() -> None: + fake = FakeApi( + httpx.Response( + 422, + json={ + "type": "https://api.cboxid.com/problems/validation_failed", + "title": "Unprocessable Content", + "status": 422, + "detail": "The name field is required.", + "error": "validation_failed", + "errors": {"name": ["The name field is required."]}, + "request_id": "req_1", + }, + headers={"content-type": "application/problem+json"}, + ) + ) + + with pytest.raises(CboxIdApiError) as caught: + v1_env(fake).apps.create({}) # type: ignore[typeddict-item] + + assert caught.value.error == "validation_failed" + assert str(caught.value.message) == "The name field is required." + assert caught.value.errors == {"name": ["The name field is required."]} + assert caught.value.request_id == "req_1" + + +def test_an_approval_held_on_v1_is_polled_and_the_request_repeated() -> None: + approval = { + "object": "approval", + "id": "apr_1", + "status": "pending", + "binding_code": "42", + "expires_at": "2099-01-01T00:00:00Z", + "poll_url": f"{V1}/approvals/apr_1", + } + fake = FakeApi( + json_response(approval, 202), + json_response({**approval, "status": "approved"}), + json_response({"object": "app_secret", "id": "sec_1"}), + ) + seen: list[str] = [] + client = v1_env(fake, on_approval_required=lambda a, _ctx: seen.append(a.binding_code)) + + result = client.apps.secrets.rotate("app_1", {"grace_seconds": 0}) + + assert seen == ["42"] + assert fake.calls[1].url == f"{V1}/approvals/apr_1" + assert fake.calls[2].headers["cbox-approval"] == "apr_1" + assert fake.calls[2].headers["idempotency-key"] == fake.calls[0].headers["idempotency-key"] + assert result.data == {"object": "app_secret", "id": "sec_1"} + + +# ── Organization naming ───────────────────────────────────────────────────────────────────── + + +def test_organization_client_is_the_workspace_client_under_its_new_name() -> None: + client = OrganizationClient(api_key="cbid_org_k") + + assert isinstance(client, WorkspaceClient) + assert client.organization is client.workspace + assert client.base_url == "https://api.cboxid.com/api/v1" + + +# ── Ids ───────────────────────────────────────────────────────────────────────────────────── + + +def test_a_prefixed_id_unwraps_to_the_raw_ulid() -> None: + assert raw_id(f"org_{ULID}") == ULID.lower() + assert raw_id(ULID.lower()) == ULID.lower() + assert raw_id("org_1") == "org_1" + assert raw_id("cbid_env_abc") == "cbid_env_abc" + assert is_prefixed_id(f"usr_{ULID}") + assert not is_prefixed_id(ULID) + + +def test_ids_match_with_and_without_their_prefix() -> None: + assert same_id(f"org_{ULID}", ULID.lower()) + assert same_id(ULID, f"org_{ULID.lower()}") + assert same_id("org_1", "org_1") + assert not same_id("org_1", "1") + assert not same_id(f"org_{ULID}", "01J9ZK3M4N5P6Q7R8S9T0VWXY0") + assert not same_id(None, ULID) + assert not same_id("", "") + + +def test_a_permission_decision_accepts_prefixed_ids_for_the_raw_ones_asked() -> None: + subject, organization = ULID.lower(), "01j9zk3m4n5p6q7r8s9t0vwxy0" + + def handler(request: httpx.Request) -> httpx.Response: + return httpx.Response( + 200, + json={ + "mode": "rbac", + "subject": {"type": "user", "id": f"usr_{subject.upper()}"}, + "organization": f"org_{organization.upper()}", + "client_id": "app-a", + "org_role": "member", + "organization_active": True, + "allowed": True, + "results": [{"permission": "documents:read", "allowed": True}], + }, + ) + + sdk = CboxIdClient( + CboxIdConfig( + issuer="https://id.example.test", + client_id="app-a", + redirect_uri="https://app.example.test/callback", + ), + http_client=httpx.Client(transport=httpx.MockTransport(handler)), + ) + + decision = sdk.check_permissions("token", subject, organization, ["documents:read"]) + + assert decision.allowed() + assert decision.subject == subject + + +# ── Event names ───────────────────────────────────────────────────────────────────────────── + + +@pytest.mark.parametrize( + ("legacy", "current"), + [ + ("organization.member_added", "id.organization.member_added"), + ("user.login", "id.user.signed_in"), + ("directory.user.provisioned", "id.directory.user.provisioned"), + ], +) +def test_an_event_has_its_old_name_and_its_id_name(legacy: str, current: str) -> None: + assert current_event_name(legacy) == current + assert current_event_name(current) == current + assert legacy_event_name(current) == legacy + assert legacy_event_name(legacy) == legacy + assert same_event(legacy, current) + assert same_event(current, legacy) + assert event_name_aliases(legacy) == (legacy, current) + assert event_name_aliases(current) == (current, legacy) + + +def test_different_events_stay_different() -> None: + assert not same_event("user.login", "id.user.created") + assert not same_event("user.created", "user.deleted") + assert current_event_name("*") == "*" + + +# ── Manifest and Pipes on api_url ─────────────────────────────────────────────────────────── + +ISSUER = "https://id.example.test" + + +def sdk(handler: Any, **config: Any) -> CboxIdClient: + return CboxIdClient( + CboxIdConfig( + issuer=ISSUER, + client_id="cid_app", + client_secret="secret", + redirect_uri="https://app.example.test/callback", + **config, + ), + http_client=httpx.Client(transport=httpx.MockTransport(handler)), + ) + + +@pytest.mark.parametrize( + ("api_url", "expected"), + [(None, f"{ISSUER}/api/v1/apps/manifest"), (API_URL, f"{V1}/app-manifests")], +) +def test_the_manifest_goes_to_v1_only_when_api_url_is_set( + api_url: str | None, expected: str +) -> None: + manifest = AuthzManifest() + manifest.permission("documents.read", "Read documents") + posted: list[str] = [] + + def handler(request: httpx.Request) -> httpx.Response: + url = str(request.url) + if url.endswith("/.well-known/openid-configuration"): + return httpx.Response( + 200, + json={ + "issuer": ISSUER, + "token_endpoint": f"{ISSUER}/oauth/token", + "jwks_uri": f"{ISSUER}/.well-known/jwks.json", + "authorization_endpoint": f"{ISSUER}/oauth/authorize", + }, + ) + if url == f"{ISSUER}/oauth/token": + return httpx.Response(200, json={"access_token": "m"}) + posted.append(url) + sent = json.loads(request.content) + return httpx.Response( + 200, + json={ + "unchanged": False, + "roles_declared": 0, + "permissions_declared": 1, + "client_id": "cid_app", + "version": sent["version"], + "checksum": manifest.checksum(), + }, + ) + + sdk(handler, api_url=api_url).publish_manifest(manifest) + + assert posted == [expected] + + +def test_a_pipe_lease_on_v1_is_a_resource_with_the_provider_in_the_body() -> None: + requests: list[httpx.Request] = [] + + def handler(request: httpx.Request) -> httpx.Response: + requests.append(request) + return httpx.Response(200, json={"access_token": "gho_abc", "provider": "github"}) + + client = PipesClient( + ISSUER, + "app-token", + api_url=f"{API_URL}/v1", + http_client=httpx.Client(transport=httpx.MockTransport(handler)), + ) + + token = client.lease_token("github", user_id="usr_1", purpose="list-repos") + + assert str(requests[0].url) == f"{V1}/pipe-leases" + assert json.loads(requests[0].content) == { + "provider": "github", + "purpose": "list-repos", + "user_id": "usr_1", + } + assert token.access_token == "gho_abc" + + +def test_a_pipe_problem_keeps_its_type_and_detail() -> None: + connect = f"{ISSUER}/account/connected-services/github/connect" + + def handler(request: httpx.Request) -> httpx.Response: + return httpx.Response( + 404, + json={ + "type": "https://api.cboxid.com/problems/pipe_not_connected", + "title": "Not Found", + "status": 404, + "detail": "Connect GitHub first.", + "error": "pipe_not_connected", + "connect_url": connect, + }, + ) + + client = PipesClient( + ISSUER, + "app-token", + api_url=API_URL, + http_client=httpx.Client(transport=httpx.MockTransport(handler)), + ) + + with pytest.raises(PipeNotConnectedError) as caught: + client.lease_token("github", purpose="x") + + assert str(caught.value) == "Connect GitHub first." + assert caught.value.connect_url == connect + + +def test_the_client_pipes_follow_the_config_api_url() -> None: + def handler(request: httpx.Request) -> httpx.Response: + raise AssertionError("no request expected") + + assert sdk(handler).pipes._v1 is None + assert sdk(handler, api_url=API_URL).pipes._v1 == V1 + + +def test_an_api_url_that_is_not_https_is_refused_up_front() -> None: + with pytest.raises(ConfigurationError, match="`api_url` must be https"): + sdk(lambda r: httpx.Response(500), api_url="http://api.cboxid.com")