{
  "openapi": "3.1.1",
  "info": {
    "title": "RestWard control-plane API",
    "description": "The platform API behind the RestWard dashboard and CLI: organizations, database connections, generated APIs,\nAPI keys, endpoints, roles, members, billing and more. Base URL `https://api.restward.tech/api/v1`.\n\nThis is **not** the API RestWard generates for your database; see the data-plane reference for that.\n\n**Authentication.** Every operation except sign-in and sign-up takes a JWT bearer token\n(`Authorization: Bearer <token>`) obtained from `POST /auth/login` and renewed with `POST /auth/refresh`.\nThe token's `org_id` claim scopes each call to one organization; organization-scoped routes reject any other `{orgId}` with 403.\nOperations marked **SystemAdmin only** (`x-restward-systemadmin: true`) are for platform operators and answer 403 to everyone else.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.restward.tech",
      "description": "RestWard Cloud"
    }
  ],
  "paths": {
    "/api/v1/admin/compute-resources": {
      "get": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Lists the platform's compute resources (provisioned hosts) with their status.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_List",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ComputeResourceSummaryDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ComputeResourceSummaryDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ComputeResourceSummaryDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      },
      "post": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Registers the resource and starts provisioning (RFC §6). 409 when the host and port already belong to a resource.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_Register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterComputeResourceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterComputeResourceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterComputeResourceRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterComputeResourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceAcceptedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceAcceptedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceAcceptedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/admin/compute-resources/{id}": {
      "get": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Returns one compute resource with its provisioning progress and host manifest.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/admin/compute-resources/adopt": {
      "post": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Adopts an existing, already-provisioned host WITHOUT re-provisioning it (RFC #488 T2):\ngenerates the management keypair, persists the resource as New, and returns the\nPUBLIC key once, for the operator to install. Idempotent per host:port. Never use\n`POST` (register) on a host that already runs the platform — it would run the\nsetup script on it.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_Adopt",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdoptComputeResourceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AdoptComputeResourceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AdoptComputeResourceRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/AdoptComputeResourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AdoptComputeResourceResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdoptComputeResourceResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdoptComputeResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/admin/compute-resources/{id}/verify-adoption": {
      "post": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Verifies an adopted host (RFC #488 T2): probes the SSH endpoint as the `restward`\nmanagement user with the management key — the only host contact of the adoption flow —\nand, on success, marks the resource Ready. A failed probe leaves it New; fix the host\nand call again.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_VerifyAdoption",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/admin/compute-resources/{id}/retry": {
      "post": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Re-runs provisioning after a failed/aborted run (New/Failed only).",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_Retry",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/admin/compute-resources/{id}/abort": {
      "post": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Aborts the in-flight provisioning run; the host is left as-is and a later retry heals it.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_Abort",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AbortRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AbortRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AbortRequest"
                  }
                ]
              }
            },
            "application/scim+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AbortRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/admin/compute-resources/{id}/labels": {
      "patch": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Merge-patches the placement labels (RFC #632 §2.4): a key with a value is set, a key with a\nnull value is removed, other labels are kept. Takes effect on the next placement or route sync.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_SetLabels",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetLabelsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetLabelsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetLabelsRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SetLabelsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComputeResourceDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/admin/compute-resources/{id}/decommission": {
      "post": {
        "tags": [
          "Compute resources"
        ],
        "summary": "Decommissions the node (#719 RFC §2.2): New/Failed/Aborted nodes and Ready nodes with no runtime placed\nbecome terminal `Decommissioned`, the management key is purged and the row is kept. 409 when\nruntimes are still placed (the body lists them), when the node is provisioning (abort first) or when it is\nthe platform host or the last host. Idempotent: repeating the call on a decommissioned node returns 200.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminComputeResources_Decommission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DecommissionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecommissionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecommissionResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/admin/runtime-migration": {
      "post": {
        "tags": [
          "Runtime migration"
        ],
        "summary": "Moves every Active API without a runtime placement onto its own container through the\nprovisioning workflow, and reports the hostname each one gets. A dry run (the default) only\nreports; pass `dryRun=false` to start the migration. Idempotent: migrated APIs are skipped\nand an open run is never started twice. Audited.",
        "description": "**SystemAdmin only.** ",
        "operationId": "AdminRuntimeMigration_Migrate",
        "parameters": [
          {
            "name": "dryRun",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SharedRuntimeMigrationReport"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedRuntimeMigrationReport"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedRuntimeMigrationReport"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/organizations/{orgId}/apis": {
      "get": {
        "tags": [
          "APIs"
        ],
        "summary": "Lists the organization's generated APIs, paged.",
        "operationId": "ApiConfigurations_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfApiConfigurationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfApiConfigurationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfApiConfigurationDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Creates an API configuration for a database connection. Provisioning is a separate call.",
        "operationId": "ApiConfigurations_Create",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiConfigurationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiConfigurationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiConfigurationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiConfigurationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/apis/{id}": {
      "get": {
        "tags": [
          "APIs"
        ],
        "summary": "Returns one API configuration with its details.",
        "operationId": "ApiConfigurations_Get",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConfigurationDetailDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConfigurationDetailDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiConfigurationDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "APIs"
        ],
        "summary": "Updates an API configuration, including its opt-in schema refresh interval (0 disables automatic reflection; 1–1440 minutes enables it).",
        "operationId": "ApiConfigurations_Update",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApiConfigurationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApiConfigurationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApiConfigurationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApiConfigurationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "APIs"
        ],
        "summary": "Deletes an API. Its runtime is torn down first, asynchronously: 202 with status `Deprovisioning` and\nthe workflow to follow, after which the API is `Archived`; 204 when there was nothing to tear down\n(never provisioned, or already archived). Repeating the call is safe.",
        "operationId": "ApiConfigurations_Delete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApiAcceptedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApiAcceptedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteApiAcceptedResponse"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/apis/{id}/usage": {
      "get": {
        "tags": [
          "APIs"
        ],
        "summary": "Returns this API's served request counts and available payload bytes for the last 30 UTC days, including today.",
        "operationId": "ApiConfigurations_GetUsage",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiUsageDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiUsageDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiUsageDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/apis/{id}/refresh": {
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Requests schema reflection and route publication on the runtime's next poll. Poll the API detail until RefreshCompletedVersion reaches the accepted RequestVersion.",
        "operationId": "ApiConfigurations_Refresh",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRefreshStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRefreshStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiRefreshStatus"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Contributor"
      }
    },
    "/api/v1/organizations/{orgId}/apis/{id}/provision": {
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Starts provisioning the API container; returns the workflow to follow.",
        "operationId": "ApiConfigurations_Provision",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/apis/{id}/status": {
      "get": {
        "tags": [
          "APIs"
        ],
        "summary": "Returns the live status of the API's provisioning workflow.",
        "operationId": "ApiConfigurations_GetStatus",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowStatus"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowStatus"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowStatus"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/apis/{id}/deprovision": {
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Starts tearing the API container down; returns the workflow to follow.",
        "operationId": "ApiConfigurations_Deprovision",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowAcceptedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/apis/{apiId}/test-request": {
      "post": {
        "tags": [
          "APIs"
        ],
        "summary": "Sends a test request to the API through the platform (the API Explorer). Allowed for read-only roles.",
        "operationId": "ApiConfigurations_TestRequest",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "apiId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestApiRequestBody"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TestApiRequestBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TestApiRequestBody"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/TestApiRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TestApiRequestResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestApiRequestResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestApiRequestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/apis/{apiId}/keys": {
      "get": {
        "tags": [
          "API keys"
        ],
        "summary": "Lists the API keys of one API (masked; the secret is shown only at creation).",
        "operationId": "ApiKeys_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "apiId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Auditor"
      },
      "post": {
        "tags": [
          "API keys"
        ],
        "summary": "Creates an API key for an API. The response carries the plain-text key once; it cannot be retrieved later.",
        "operationId": "ApiKeys_Create",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "apiId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Contributor"
      }
    },
    "/api/v1/organizations/{orgId}/apis/{apiId}/keys/{keyId}": {
      "delete": {
        "tags": [
          "API keys"
        ],
        "summary": "Revokes an API key immediately (reversible by audit; the row stays).",
        "operationId": "ApiKeys_Revoke",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "apiId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Contributor"
      }
    },
    "/api/v1/organizations/{orgId}/apis/{apiId}/keys/{keyId}/permanent": {
      "delete": {
        "tags": [
          "API keys"
        ],
        "summary": "Permanently deletes an API key. Only allowed once the key has been revoked.",
        "operationId": "ApiKeys_PermanentDelete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "apiId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "Creates an account and signs the user in. Pass `invitationToken` to join the inviting organization; the response says whether onboarding is still required.",
        "operationId": "Auth_Register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/verify-email": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#237: redeems the link from the verification email. The same 400 for every bad link.",
        "operationId": "Auth_VerifyEmail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/change-password": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#237: the signed-in user changes their password (current password required). Answers the FRESH\ntoken pair for this session: the credential change revokes the other sessions and the re-issued\none is committed in the same save. A weak new password is a 400 with the reason; a wrong current\npassword is a 400 without saying more.",
        "operationId": "Auth_ChangePassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/forgot-password": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#237: the lost-password step. Sends a single-use reset link to the address — always a 204,\nwhether or not the address has an account (no enumeration).",
        "operationId": "Auth_ForgotPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/reset-password": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#237: redeems the reset link and sets the new password, returning a fresh session for the\naccount. A weak password is a 400 with the reason (the link stays usable); every bad link is\nthe same 400.",
        "operationId": "Auth_ResetPassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/resend-verification": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#233: sends the signed-in user a new verification link (204 whether or not one was sent).",
        "operationId": "Auth_ResendVerification",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "Signs in with email and password and returns an access/refresh token pair.",
        "operationId": "Auth_Login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/cli/authorize": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#457 / #93 T1: mints a single-use, 60-second CLI authorization code for THIS session, bound to the\nCLI's PKCE S256 challenge and loopback callback (port + hostname). The code is returned once and\nonly its hash is stored; the CLI exchanges it at `POST /api/v1/auth/cli/token` for its own\nsession (client \"cli\"), which inherits this session's amr. Only a WEB session may mint: a CLI\nsession minting for itself would reset the 30-day SSO CLI cap (403).",
        "operationId": "Auth_CliAuthorize",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CliAuthorizeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CliAuthorizeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CliAuthorizeRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CliAuthorizeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CliAuthorizeResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CliAuthorizeResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CliAuthorizeResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/cli/token": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#457 / #93 T1: the CLI's local loopback callback. Trades a single-use authorization code and the\nPKCE verifier for an access/refresh pair tagged `client=cli` that inherits the minting\nsession's amr. Anonymous (the code is the credential) and throttled; the code is valid for 60 s\nand only from the port and hostname it was bound to. Every refusal is the same 400.",
        "operationId": "Auth_CliToken",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CliTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CliTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CliTokenRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CliTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/refresh": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "Exchanges a refresh token for a new access/refresh token pair. Refresh tokens rotate: store the new one from the response.",
        "operationId": "Auth_Refresh",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "With a body `{ \"refreshToken\": \"...\" }`: revokes only that token's session (#176). Possession of\nthe refresh token is the credential, so the endpoint is anonymous for this variant — an expired access\ntoken (15 minutes) must not stop a client from revoking its own session. Always 204 for a well-formed\nbody, whether or not the token exists (no oracle for token validity); rate-limited like refresh.\nWithout a body (or an empty token): revokes every session of the authenticated user, as before; an\nunauthenticated caller then gets 401, exactly as when the endpoint required authorization.",
        "operationId": "Auth_Logout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/LogoutRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/LogoutRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/LogoutRequest"
                  }
                ]
              }
            },
            "application/scim+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/LogoutRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/sessions": {
      "get": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#461: lists the signed-in user's own active session families — nothing of anyone else is ever\nreturned or revealed. `current` marks the family the caller's own access token belongs to.",
        "operationId": "Auth_ListSessions",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionFamilyDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionFamilyDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SessionFamilyDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/sessions/{familyId}": {
      "delete": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#461: revokes one of the signed-in user's own session families. A family that is not the caller's\nor does not exist is a 404 (no existence oracle).",
        "operationId": "Auth_RevokeSession",
        "parameters": [
          {
            "name": "familyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/switch-org": {
      "post": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "Re-issues the token pair scoped to another organization the user belongs to (changes the `org_id` claim).",
        "operationId": "Auth_SwitchOrganization",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchOrganizationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchOrganizationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchOrganizationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/email-status": {
      "get": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "#634: whether the signed-in user's own email address is confirmed (polled by a waiting onboarding tab).",
        "operationId": "Auth_GetEmailStatus",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerificationStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerificationStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailVerificationStatusDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/memberships": {
      "get": {
        "tags": [
          "Sign in & tokens"
        ],
        "summary": "Lists the organizations the signed-in user belongs to, with their role in each.",
        "operationId": "Auth_GetMemberships",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MembershipDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MembershipDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MembershipDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/auth-methods": {
      "get": {
        "tags": [
          "Sign-in methods"
        ],
        "summary": "Lists the organization's authentication methods and whether each is enabled.",
        "operationId": "AuthMethods_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuthMethodDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuthMethodDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuthMethodDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/auth-methods/{id}": {
      "put": {
        "tags": [
          "Sign-in methods"
        ],
        "summary": "Enables or disables an authentication method.",
        "operationId": "AuthMethods_Toggle",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToggleAuthMethodRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ToggleAuthMethodRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ToggleAuthMethodRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ToggleAuthMethodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/auth-methods/{id}/configuration": {
      "put": {
        "tags": [
          "Sign-in methods"
        ],
        "summary": "Replaces the configuration of an authentication method.",
        "operationId": "AuthMethods_UpdateConfiguration",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAuthMethodConfigurationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAuthMethodConfigurationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAuthMethodConfigurationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAuthMethodConfigurationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/billing/checkout": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Starts a Stripe Checkout session for a plan; redirect the user to the returned URL.",
        "operationId": "Billing_CreateCheckout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CheckoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSessionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSessionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/billing/portal": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Opens a Stripe billing-portal session; redirect the user to the returned URL.",
        "operationId": "Billing_CreatePortal",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PortalRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/PortalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PortalSessionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalSessionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/billing/status": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Returns whether billing (Stripe) is configured on this deployment.",
        "operationId": "Billing_GetBillingStatus",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BillingStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingStatusDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/billing/subscription": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Returns the organization's subscription.",
        "operationId": "Billing_GetSubscription",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/billing/entitlements": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Returns the plan limits and current usage of the organization.",
        "operationId": "Billing_GetEntitlements",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EntitlementsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntitlementsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntitlementsDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/billing/subscription/plan": {
      "put": {
        "tags": [
          "Billing"
        ],
        "summary": "Changes the subscription's plan.",
        "operationId": "Billing_ChangePlan",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/billing/subscription/cancel": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Cancels the organization's subscription.",
        "operationId": "Billing_CancelSubscription",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/billing/invoices": {
      "get": {
        "tags": [
          "Billing"
        ],
        "summary": "Lists the organization's invoices, newest first, paged. An organization without a\nsubscription (free tier) gets 404: it has no invoices and no billing history.",
        "operationId": "Billing_ListInvoices",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfInvoiceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfInvoiceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfInvoiceDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/billing/subscription/invoice": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Puts an organization on an invoice-mode subscription (spec §9). SystemAdmin only: the target\norg is named in the body, not taken from the caller's own `org_id` claim. Stripe is never called.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Billing_CreateInvoiceSubscription",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceSubscriptionRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      },
      "put": {
        "tags": [
          "Billing"
        ],
        "summary": "Changes the plan / interval / contract reference of an org's invoice-mode subscription\n(#333). SystemAdmin only; the org's own admins get 403 from `PUT subscription/plan`.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Billing_ChangeInvoiceSubscription",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeInvoiceSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeInvoiceSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeInvoiceSubscriptionRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeInvoiceSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/billing/subscription/invoice/{id}/mark-paid": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Records that the direct invoice was paid: PastDue → Active.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Billing_MarkInvoiceSubscriptionPaid",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/billing/subscription/invoice/{id}/mark-overdue": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Records that the direct invoice is overdue: Active → PastDue. Never suspends (spec §11).",
        "description": "**SystemAdmin only.** ",
        "operationId": "Billing_MarkInvoiceSubscriptionOverdue",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/billing/subscription/manual": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Grants an organization a manual license (#363): any plan, an optional end date (perpetual\nwhen omitted), no Stripe and no invoicing. The sales/demo override, audit-logged.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Billing_GrantManualLicense",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantManualLicenseRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GrantManualLicenseRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GrantManualLicenseRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/GrantManualLicenseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      },
      "put": {
        "tags": [
          "Billing"
        ],
        "summary": "Changes a manual license's plan and end date (#363): the operator's \"extend\" action.\nA null end date makes the license perpetual.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Billing_ChangeManualLicense",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeManualLicenseRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeManualLicenseRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeManualLicenseRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeManualLicenseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/billing/subscription/manual/revoke": {
      "post": {
        "tags": [
          "Billing"
        ],
        "summary": "Ends a manual license (#363): the row is canceled and the organization falls back to its\ntrial state.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Billing_RevokeManualLicense",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeManualLicenseRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeManualLicenseRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeManualLicenseRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeManualLicenseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/dashboard/stats": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Summary counts for the organization dashboard (cached for 30 seconds).",
        "operationId": "Dashboard_GetStats",
        "parameters": [
          {
            "name": "orgId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationStatsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationStatsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationStatsDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/dashboard/metrics": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Headline request metrics for the dashboard.",
        "operationId": "Dashboard_GetMetrics",
        "parameters": [
          {
            "name": "orgId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardMetricsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardMetricsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DashboardMetricsDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/dashboard/request-volume": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Request volume over a period (`period`, default `7d`).",
        "operationId": "Dashboard_GetRequestVolume",
        "parameters": [
          {
            "name": "orgId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RequestVolumeDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestVolumeDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestVolumeDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/dashboard/activity": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Recent audit activity of the organization (`limit`, default 10).",
        "operationId": "Dashboard_GetActivity",
        "parameters": [
          {
            "name": "orgId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityFeedResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityFeedResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityFeedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/connections": {
      "get": {
        "tags": [
          "Database connections"
        ],
        "summary": "Lists the organization's database connections.",
        "operationId": "DatabaseConnections_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DatabaseConnectionDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DatabaseConnectionDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DatabaseConnectionDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Database connections"
        ],
        "summary": "Creates a database connection. The password is encrypted at rest and never returned.",
        "operationId": "DatabaseConnections_Create",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatabaseConnectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatabaseConnectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatabaseConnectionRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDatabaseConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/connections/search": {
      "get": {
        "tags": [
          "Database connections"
        ],
        "summary": "Searches database connections by name or provider, paged.",
        "operationId": "DatabaseConnections_Search",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "searchTerm",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfDatabaseConnectionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfDatabaseConnectionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfDatabaseConnectionDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/connections/{id}": {
      "get": {
        "tags": [
          "Database connections"
        ],
        "summary": "Returns one database connection. The password is never returned (the field is empty).",
        "operationId": "DatabaseConnections_Get",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseConnectionWithCredentialsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseConnectionWithCredentialsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabaseConnectionWithCredentialsDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Database connections"
        ],
        "summary": "Deletes a database connection.",
        "operationId": "DatabaseConnections_Delete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Database connections"
        ],
        "summary": "Updates a database connection.",
        "operationId": "DatabaseConnections_Update",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConnectionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConnectionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConnectionRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/connections/{id}/test": {
      "post": {
        "tags": [
          "Database connections"
        ],
        "summary": "Tests a saved connection. A failed test is a 200 with `connected: false` and a reason.",
        "operationId": "DatabaseConnections_Test",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTestResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTestResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTestResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/connections/{id}/sync-schema": {
      "post": {
        "tags": [
          "Database connections"
        ],
        "summary": "Reads the database schema and stores its tables and views.",
        "operationId": "DatabaseConnections_SyncSchema",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TablesDiscoveredResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesDiscoveredResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesDiscoveredResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/connections/{id}/tables": {
      "get": {
        "tags": [
          "Database connections"
        ],
        "summary": "Lists the tables and views found by the last schema sync.",
        "operationId": "DatabaseConnections_GetTables",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "schemas",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TablesResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TablesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/connections/browse-databases": {
      "post": {
        "tags": [
          "Database connections"
        ],
        "summary": "Lists the databases on a server for the given credentials, before a connection is saved.",
        "operationId": "DatabaseConnections_BrowseDatabases",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowseDatabasesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BrowseDatabasesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BrowseDatabasesRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/BrowseDatabasesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DatabasesResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabasesResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatabasesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/connections/test-changes": {
      "post": {
        "tags": [
          "Database connections"
        ],
        "summary": "Tests unsaved connection settings without storing them.",
        "operationId": "DatabaseConnections_TestChanges",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestConnectionChangesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TestConnectionChangesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TestConnectionChangesRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/TestConnectionChangesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTestResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTestResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionTestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/documentation": {
      "get": {
        "tags": [
          "API documentation"
        ],
        "summary": "Returns the API documentation settings.",
        "operationId": "Documentation_Get",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationConfigDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationConfigDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationConfigDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "API documentation"
        ],
        "summary": "Updates the API documentation settings.",
        "operationId": "Documentation_Update",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/documentation/publish": {
      "post": {
        "tags": [
          "API documentation"
        ],
        "summary": "Publishes the API documentation.",
        "operationId": "Documentation_Publish",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishDocumentationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishDocumentationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublishDocumentationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/PublishDocumentationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/documentation/pages": {
      "get": {
        "tags": [
          "API documentation"
        ],
        "summary": "Lists the documentation pages.",
        "operationId": "Documentation_GetPages",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentationPageDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentationPageDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentationPageDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "API documentation"
        ],
        "summary": "Creates a documentation page.",
        "operationId": "Documentation_CreatePage",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentationPageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentationPageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentationPageRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentationPageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationPageDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationPageDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationPageDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/documentation/pages/{pageId}": {
      "put": {
        "tags": [
          "API documentation"
        ],
        "summary": "Updates a documentation page.",
        "operationId": "Documentation_UpdatePage",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationPageRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationPageRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationPageRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationPageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "API documentation"
        ],
        "summary": "Deletes a documentation page.",
        "operationId": "Documentation_DeletePage",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/documentation/examples": {
      "get": {
        "tags": [
          "API documentation"
        ],
        "summary": "Lists the documentation examples.",
        "operationId": "Documentation_GetExamples",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentationExampleDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentationExampleDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DocumentationExampleDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "API documentation"
        ],
        "summary": "Creates a documentation example.",
        "operationId": "Documentation_CreateExample",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentationExampleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentationExampleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentationExampleRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDocumentationExampleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationExampleDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationExampleDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentationExampleDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/documentation/examples/{exampleId}": {
      "put": {
        "tags": [
          "API documentation"
        ],
        "summary": "Updates a documentation example.",
        "operationId": "Documentation_UpdateExample",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "exampleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationExampleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationExampleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationExampleRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentationExampleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "API documentation"
        ],
        "summary": "Deletes a documentation example.",
        "operationId": "Documentation_DeleteExample",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "exampleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/domains": {
      "get": {
        "tags": [
          "Custom domains"
        ],
        "summary": "Lists the organization's claimed domains and their verification status.",
        "operationId": "Domains_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationDomainDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationDomainDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationDomainDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Custom domains"
        ],
        "summary": "Claims an email domain for the organization; verification follows.",
        "operationId": "Domains_Add",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDomainDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDomainDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDomainDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/domains/{id}/verify": {
      "post": {
        "tags": [
          "Custom domains"
        ],
        "summary": "Verifies the domain claim and marks the domain verified.",
        "operationId": "Domains_Verify",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/domains/{id}/verification-instructions": {
      "get": {
        "tags": [
          "Custom domains"
        ],
        "summary": "Returns the DNS record to publish to verify the domain.",
        "operationId": "Domains_VerificationInstructions",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DomainVerificationInstructionsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainVerificationInstructionsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainVerificationInstructionsDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/egress-addresses": {
      "get": {
        "tags": [
          "Egress addresses"
        ],
        "summary": "Lists the platform's detected egress addresses (its own and its running compute hosts), each with when it was last verified.",
        "operationId": "EgressAddresses_Get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EgressAddressesDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EgressAddressesDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EgressAddressesDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/endpoints": {
      "get": {
        "tags": [
          "Endpoints"
        ],
        "summary": "Lists the organization's endpoint configurations.",
        "operationId": "EndpointConfigurations_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "apiId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EndpointConfigurationDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EndpointConfigurationDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EndpointConfigurationDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Endpoints"
        ],
        "summary": "Creates an endpoint configuration (a table or view exposed by an API).",
        "operationId": "EndpointConfigurations_Create",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/endpoints/search": {
      "get": {
        "tags": [
          "Endpoints"
        ],
        "summary": "Searches endpoint configurations, paged.",
        "operationId": "EndpointConfigurations_Search",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "searchTerm",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfEndpointConfigurationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfEndpointConfigurationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfEndpointConfigurationDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/endpoints/{id}": {
      "get": {
        "tags": [
          "Endpoints"
        ],
        "summary": "Returns one endpoint configuration.",
        "operationId": "EndpointConfigurations_Get",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointConfigurationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointConfigurationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointConfigurationDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Endpoints"
        ],
        "summary": "Updates an endpoint configuration.",
        "operationId": "EndpointConfigurations_Update",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Endpoints"
        ],
        "summary": "Deletes an endpoint configuration.",
        "operationId": "EndpointConfigurations_Delete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/endpoints/regenerate": {
      "post": {
        "tags": [
          "Endpoints"
        ],
        "summary": "Regenerates the endpoints of an API from its connection's current schema; returns how many were created.",
        "operationId": "EndpointConfigurations_Regenerate",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateEndpointsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateEndpointsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateEndpointsRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/RegenerateEndpointsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                  "type": [
                    "integer",
                    "string"
                  ],
                  "format": "int32"
                }
              },
              "application/json": {
                "schema": {
                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                  "type": [
                    "integer",
                    "string"
                  ],
                  "format": "int32"
                }
              },
              "text/json": {
                "schema": {
                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                  "type": [
                    "integer",
                    "string"
                  ],
                  "format": "int32"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gdpr-exports": {
      "post": {
        "tags": [
          "GDPR reports"
        ],
        "summary": "Starts the organization's GDPR report. 409 while one is being prepared, 429 (with Retry-After) during the 24-hour cooldown.",
        "operationId": "GdprExports_Start",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStartedDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStartedDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStartedDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gdpr-exports/latest": {
      "get": {
        "tags": [
          "GDPR reports"
        ],
        "summary": "Status of the organization's newest GDPR report (404 when none was requested yet).",
        "operationId": "GdprExports_GetLatest",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gdpr-exports/{exportId}": {
      "get": {
        "tags": [
          "GDPR reports"
        ],
        "summary": "Status of one GDPR report.",
        "operationId": "GdprExports_Get",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{organizationId}/gdpr-exports/{exportId}/download": {
      "get": {
        "tags": [
          "GDPR reports"
        ],
        "summary": "Downloads the decrypted ZIP. Only the administrator who requested the report (another administrator gets 403); 410 once it expired or was cancelled.",
        "operationId": "GdprExports_Download",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FileResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/invitations": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Lists the organization's invitations, including the redeemable token of pending ones. Administrator only.",
        "operationId": "Invitations_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvitationDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvitationDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InvitationDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      },
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Invites an email address to the organization with a role.",
        "operationId": "Invitations_Create",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/invitations/{id}": {
      "delete": {
        "tags": [
          "Invitations"
        ],
        "summary": "Revokes a pending invitation.",
        "operationId": "Invitations_Revoke",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/logs": {
      "get": {
        "tags": [
          "Audit logs"
        ],
        "summary": "Lists audit log entries, filterable by organization, level and search text. Administrator only.",
        "operationId": "Logs_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "level",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResultOfAuditLogEntryDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResultOfAuditLogEntryDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResultOfAuditLogEntryDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/me/gdpr-exports": {
      "post": {
        "tags": [
          "My GDPR report"
        ],
        "summary": "Starts the caller's own GDPR report. 409 while one is being prepared, 429 (with Retry-After) during the 24-hour cooldown.",
        "operationId": "MeGdprExports_Start",
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStartedDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStartedDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStartedDto"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/me/gdpr-exports/latest": {
      "get": {
        "tags": [
          "My GDPR report"
        ],
        "summary": "Status of the caller's newest GDPR report (404 when none was requested yet).",
        "operationId": "MeGdprExports_GetLatest",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/me/gdpr-exports/{exportId}": {
      "get": {
        "tags": [
          "My GDPR report"
        ],
        "summary": "Status of one of the caller's GDPR reports.",
        "operationId": "MeGdprExports_Get",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/GdprExportStatusDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/me/gdpr-exports/{exportId}/download": {
      "get": {
        "tags": [
          "My GDPR report"
        ],
        "summary": "Downloads the decrypted ZIP. Only the person who requested it (anybody else gets 403); 410 once it expired or was cancelled.",
        "operationId": "MeGdprExports_Download",
        "parameters": [
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/FileResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResult"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/members": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Lists the organization's members, paged.",
        "operationId": "Members_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfOrganizationMemberDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfOrganizationMemberDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfOrganizationMemberDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/members/{userId}/approve": {
      "post": {
        "tags": [
          "Members"
        ],
        "summary": "Approves a pending join request.",
        "operationId": "Members_Approve",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApproveMemberRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApproveMemberRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApproveMemberRequest"
                  }
                ]
              }
            },
            "application/scim+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApproveMemberRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/members/{userId}/reject": {
      "post": {
        "tags": [
          "Members"
        ],
        "summary": "Rejects a pending join request.",
        "operationId": "Members_Reject",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/metrics-export": {
      "get": {
        "tags": [
          "Metrics export"
        ],
        "summary": "Returns the organization's metrics export configuration; header values are never returned.",
        "operationId": "MetricsExport_Get",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      },
      "put": {
        "tags": [
          "Metrics export"
        ],
        "summary": "Creates or replaces the organization's metrics export configuration.",
        "operationId": "MetricsExport_Upsert",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertMetricsExportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertMetricsExportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertMetricsExportRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertMetricsExportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportConfigurationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportConfigurationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportConfigurationDto"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      },
      "delete": {
        "tags": [
          "Metrics export"
        ],
        "summary": "Removes the organization's metrics export configuration. confirmSlug is the organization slug typed back.",
        "operationId": "MetricsExport_Delete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "confirmSlug",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/metrics-export/test": {
      "post": {
        "tags": [
          "Metrics export"
        ],
        "summary": "Sends one synthetic sample to the saved target and reports the HTTP status (never the response body).",
        "operationId": "MetricsExport_SendTest",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportTestResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportTestResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsExportTestResultDto"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/metrics/catalog": {
      "get": {
        "tags": [
          "API metrics"
        ],
        "summary": "The customer catalog (API and organization entries) and the windows the organization's plan allows.",
        "operationId": "OrganizationMetrics_GetCatalog",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantMetricsCatalogDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantMetricsCatalogDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantMetricsCatalogDto"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/metrics/{queryId}": {
      "get": {
        "tags": [
          "API metrics"
        ],
        "summary": "One organization-overview entry (`org.*`) across the organization's APIs.",
        "operationId": "OrganizationMetrics_QueryOrganization",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "queryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/apis/{apiId}/metrics/{queryId}": {
      "get": {
        "tags": [
          "API metrics"
        ],
        "summary": "One API entry (`api.*`) for one of the organization's APIs. Another organization's API is 404.",
        "operationId": "OrganizationMetrics_QueryApi",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "apiId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "queryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Lists the organizations the caller can see.",
        "operationId": "Organizations_List",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Creates an organization.",
        "operationId": "Organizations_Create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{id}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Returns one organization.",
        "operationId": "Organizations_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "Updates an organization.",
        "operationId": "Organizations_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Deletes an organization (SystemAdmin): starts the deletion workflow (#606 RFC §3.1).",
        "description": "**SystemAdmin only.** ",
        "operationId": "Organizations_Delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/organizations/by-slug/{slug}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Returns an organization by its slug.",
        "operationId": "Organizations_GetBySlug",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{id}/offboard": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Starts offboarding an organization (SystemAdmin): the deletion workflow with immediate=true (#606 RFC §3.1).",
        "description": "**SystemAdmin only.** ",
        "operationId": "Organizations_Offboard",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/organizations/{id}/deletion-requests": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Starts a self-service deletion request: mails the one-time confirmation link to the requester (#606 RFC §3.1).",
        "operationId": "Organizations_RequestDeletion",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestOrganizationDeletionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestOrganizationDeletionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestOrganizationDeletionRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/RequestOrganizationDeletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "Restores the organization during the grace period (cancels the deletion request).",
        "operationId": "Organizations_RestoreDeletion",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{id}/deletion-requests/confirm": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "Confirms a deletion request with the one-time token from the e-mailed link and starts the deletion workflow.",
        "operationId": "Organizations_ConfirmDeletion",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmOrganizationDeletionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmOrganizationDeletionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmOrganizationDeletionRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmOrganizationDeletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{id}/deletion-request": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Returns the deletion status of the organization for the dashboard banner (phase, scheduled-for, days remaining).",
        "operationId": "Organizations_GetDeletionStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationDeletionStatusDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/api-keys/{id}/custom-role": {
      "put": {
        "tags": [
          "Organization API keys"
        ],
        "summary": "Assigns an API-specific data-plane role to a key; null restores its built-in role. Administrator only, audited.",
        "operationId": "OrgApiKeys_AssignCustomRole",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignApiKeyCustomRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignApiKeyCustomRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignApiKeyCustomRoleRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignApiKeyCustomRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/api-keys": {
      "get": {
        "tags": [
          "Organization API keys"
        ],
        "summary": "Lists the organization-level API keys.",
        "operationId": "OrgApiKeys_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrgApiKeyDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrgApiKeyDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrgApiKeyDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Auditor"
      }
    },
    "/api/v1/organizations/{orgId}/api-keys/{id}/allowed-ips": {
      "put": {
        "tags": [
          "Organization API keys"
        ],
        "summary": "Replaces the key's IP allowlist (#202). The body lists addresses and CIDR ranges; an empty list removes the restriction.\nA refused entry is a 400 naming it. The data plane picks the change up within one configuration refresh\n(`EndpointConfig:RefreshSeconds`, 30 s by default).",
        "operationId": "OrgApiKeys_UpdateAllowedIps",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApiKeyAllowedIpsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApiKeyAllowedIpsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApiKeyAllowedIpsRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateApiKeyAllowedIpsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Contributor"
      }
    },
    "/api/v1/organizations/{orgId}/api-keys/{id}/rotate": {
      "post": {
        "tags": [
          "Organization API keys"
        ],
        "summary": "Rotates an organization API key: the old key stops working and the response carries the new plain-text key once.",
        "operationId": "OrgApiKeys_Rotate",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RotateApiKeyResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotateApiKeyResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotateApiKeyResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Contributor"
      }
    },
    "/api/v1/auth/passkey/register/options": {
      "post": {
        "tags": [
          "Passkeys"
        ],
        "summary": "Starts registering a passkey for the signed-in user; returns the WebAuthn creation options. 404 when passkeys are disabled.",
        "operationId": "Passkey_BeginRegistration",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyOptionsResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyOptionsResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyOptionsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/passkey/register": {
      "post": {
        "tags": [
          "Passkeys"
        ],
        "summary": "Completes passkey registration with the authenticator's attestation.",
        "operationId": "Passkey_CompleteRegistration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletePasskeyRegistrationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompletePasskeyRegistrationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompletePasskeyRegistrationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CompletePasskeyRegistrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyCredentialDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyCredentialDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyCredentialDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/passkey/login/options": {
      "post": {
        "tags": [
          "Passkeys"
        ],
        "summary": "Starts a passkey sign-in; returns the WebAuthn request options.",
        "operationId": "Passkey_BeginLogin",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyOptionsResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyOptionsResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PasskeyOptionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/passkey/login": {
      "post": {
        "tags": [
          "Passkeys"
        ],
        "summary": "Completes a passkey sign-in with the authenticator's assertion and returns a token pair.",
        "operationId": "Passkey_CompleteLogin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyLoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyLoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyLoginRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/PasskeyLoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/passkey": {
      "get": {
        "tags": [
          "Passkeys"
        ],
        "summary": "Lists the signed-in user's passkeys.",
        "operationId": "Passkey_List",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PasskeyCredentialDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PasskeyCredentialDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PasskeyCredentialDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/auth/passkey/{id}": {
      "patch": {
        "tags": [
          "Passkeys"
        ],
        "summary": "Renames one of the signed-in user's passkeys.",
        "operationId": "Passkey_Rename",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenamePasskeyRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RenamePasskeyRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RenamePasskeyRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/RenamePasskeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Passkeys"
        ],
        "summary": "Deletes one of the signed-in user's passkeys.",
        "operationId": "Passkey_Delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Lists the organization's roles with their permissions.",
        "operationId": "Roles_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Roles"
        ],
        "summary": "Creates a custom role (Administrator only; Professional and Enterprise plans).",
        "operationId": "Roles_Create",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/roles/settings": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Whether the organization enabled custom roles, and whether its plan includes them.",
        "operationId": "Roles_GetSettings",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRolesSettingsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRolesSettingsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomRolesSettingsDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "put": {
        "tags": [
          "Roles"
        ],
        "summary": "Turns custom roles on or off for the organization (Administrator only, audited). While off, every member keeps their built-in role.",
        "operationId": "Roles_SetSettings",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCustomRolesEnabledRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCustomRolesEnabledRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetCustomRolesEnabledRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SetCustomRolesEnabledRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/roles/{id}": {
      "put": {
        "tags": [
          "Roles"
        ],
        "summary": "Updates a custom role.",
        "operationId": "Roles_Update",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      },
      "delete": {
        "tags": [
          "Roles"
        ],
        "summary": "Deletes a custom role.",
        "operationId": "Roles_Delete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/roles/{id}/permissions": {
      "put": {
        "tags": [
          "Roles"
        ],
        "summary": "Replaces the permissions of a role.",
        "operationId": "Roles_UpdatePermissions",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePermissionsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePermissionsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePermissionsRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePermissionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/scim/tokens": {
      "get": {
        "tags": [
          "SCIM provisioning"
        ],
        "summary": "Lists the organization's SCIM provisioning tokens (no secrets). Administrator only; 404 when SCIM is disabled.",
        "operationId": "ScimTokens_Get",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScimTokenDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScimTokenDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScimTokenDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      },
      "post": {
        "tags": [
          "SCIM provisioning"
        ],
        "summary": "Creates a SCIM provisioning token. The response carries the token once, with the SCIM base URL.",
        "operationId": "ScimTokens_Create",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScimTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScimTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScimTokenRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScimTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScimTokenResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScimTokenResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScimTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/scim/tokens/{tokenId}": {
      "delete": {
        "tags": [
          "SCIM provisioning"
        ],
        "summary": "Revokes a SCIM provisioning token.",
        "operationId": "ScimTokens_Delete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/scim/group-mappings": {
      "get": {
        "tags": [
          "SCIM provisioning"
        ],
        "summary": "Lists how identity-provider groups map to organization roles.",
        "operationId": "ScimTokens_GetGroupMappings",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScimGroupMappingDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScimGroupMappingDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ScimGroupMappingDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/scim/group-mappings/{mappingId}/role": {
      "put": {
        "tags": [
          "SCIM provisioning"
        ],
        "summary": "Sets the role a SCIM-provisioned group grants.",
        "operationId": "ScimTokens_SetGroupMappingRole",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetGroupRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetGroupRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetGroupRoleRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SetGroupRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/settings": {
      "get": {
        "tags": [
          "Platform settings"
        ],
        "summary": "Returns the platform-wide settings.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Settings_Get",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSettingsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSettingsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlatformSettingsDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      },
      "put": {
        "tags": [
          "Platform settings"
        ],
        "summary": "Updates the platform-wide settings.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Settings_Update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSettingsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSettingsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSettingsRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/system/version": {
      "get": {
        "tags": [
          "Platform settings"
        ],
        "summary": "Returns the build version and runtime of the running API.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Settings_GetVersion",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SystemVersionResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemVersionResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemVersionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/organizations/{orgId}/sso": {
      "get": {
        "tags": [
          "SSO configuration"
        ],
        "summary": "Returns the organization's enterprise SSO configuration status.",
        "operationId": "Sso_Get",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SsoConfigurationStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoConfigurationStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoConfigurationStatusDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      },
      "put": {
        "tags": [
          "SSO configuration"
        ],
        "summary": "Creates or replaces the organization's OIDC SSO configuration.",
        "operationId": "Sso_Upsert",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertSsoConfigurationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertSsoConfigurationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertSsoConfigurationRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertSsoConfigurationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SsoConfigurationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoConfigurationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoConfigurationDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      },
      "delete": {
        "tags": [
          "SSO configuration"
        ],
        "summary": "Removes the organization's SSO configuration.",
        "operationId": "Sso_Delete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/auth/sso/discover": {
      "post": {
        "tags": [
          "SSO sign-in"
        ],
        "summary": "Tells whether an email address belongs to an organization that requires SSO.",
        "operationId": "SsoLogin_Discover",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SsoDiscoverRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SsoDiscoverRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SsoDiscoverRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SsoDiscoverRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SsoDiscoveryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoDiscoveryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoDiscoveryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/sso/challenge": {
      "post": {
        "tags": [
          "SSO sign-in"
        ],
        "summary": "Starts an SSO sign-in for an organization; returns the identity provider URL to redirect to.",
        "operationId": "SsoLogin_Challenge",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SsoChallengeRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SsoChallengeRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SsoChallengeRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SsoChallengeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SsoChallengeResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoChallengeResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoChallengeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/auth/sso/complete": {
      "post": {
        "tags": [
          "SSO sign-in"
        ],
        "summary": "Completes an SSO sign-in with the authorization code and state, and returns a token pair.",
        "operationId": "SsoLogin_Complete",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SsoCompleteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SsoCompleteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SsoCompleteRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SsoCompleteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SsoLoginResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoLoginResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SsoLoginResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/system/metrics/catalog": {
      "get": {
        "tags": [
          "Platform metrics"
        ],
        "summary": "The named-query catalog: ids, titles, units, kinds, label allowlists and the accepted windows.",
        "description": "**SystemAdmin only.** ",
        "operationId": "SystemMetrics_GetCatalog",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricsCatalogEntryDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricsCatalogEntryDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricsCatalogEntryDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/system/metrics/{queryId}": {
      "get": {
        "tags": [
          "Platform metrics"
        ],
        "summary": "One named query over one window. `window` is 1h, 6h, 24h (default) or 7d. Unknown ids are 404, unknown windows 400.",
        "description": "**SystemAdmin only.** ",
        "operationId": "SystemMetrics_Query",
        "parameters": [
          {
            "name": "queryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricsQueryResultDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/system/alerts": {
      "get": {
        "tags": [
          "Platform metrics"
        ],
        "summary": "The active alerts from Alertmanager: unsilenced and uninhibited. `status` is `unavailable` when Alertmanager cannot be read.",
        "description": "**SystemAdmin only.** ",
        "operationId": "SystemMetrics_GetAlerts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AlertsResultDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertsResultDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertsResultDto"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/tenants": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Lists tenants (organizations) across the platform.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Tenants_List",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenantDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      },
      "post": {
        "tags": [
          "Tenants"
        ],
        "summary": "Creates a tenant organization on a plan.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Tenants_Create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTenantRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/tenants/{id}": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Returns one tenant with its details.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Tenants_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantDetailDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantDetailDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/tenants/{id}/usage": {
      "get": {
        "tags": [
          "Tenants"
        ],
        "summary": "Returns a tenant's usage.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Tenants_GetUsage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TenantUsageDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantUsageDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantUsageDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/tenants/{id}/trial/extend": {
      "post": {
        "tags": [
          "Tenants"
        ],
        "summary": "Extends a tenant's trial (#363): either \"+N days\" or an absolute end date. Audit-logged.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Tenants_ExtendTrial",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendTrialRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendTrialRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendTrialRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/ExtendTrialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/tenants/{id}/payment-grace": {
      "put": {
        "tags": [
          "Tenants"
        ],
        "summary": "Sets a tenant's per-org payment grace period (#363 P3-5): null resets to the global default, 0–90 allowed. Audit-logged.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Tenants_SetPaymentGrace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPaymentGraceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPaymentGraceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetPaymentGraceRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SetPaymentGraceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                  "type": [
                    "null",
                    "integer",
                    "string"
                  ],
                  "format": "int32"
                }
              },
              "application/json": {
                "schema": {
                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                  "type": [
                    "null",
                    "integer",
                    "string"
                  ],
                  "format": "int32"
                }
              },
              "text/json": {
                "schema": {
                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                  "type": [
                    "null",
                    "integer",
                    "string"
                  ],
                  "format": "int32"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/organizations/{orgId}/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Lists the organization's users, paged.",
        "operationId": "Users_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfOrganizationMemberDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfOrganizationMemberDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResultOfOrganizationMemberDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/users/{userId}/promote": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Promotes a user to Administrator of the organization; a reason is recorded in the audit log.",
        "description": "**SystemAdmin only.** ",
        "operationId": "Users_Promote",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromoteUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PromoteUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PromoteUserRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/PromoteUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-systemadmin": true
      }
    },
    "/api/v1/organizations/{orgId}/users/bulk-delete": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Removes several users from the organization; reports per-user results.",
        "operationId": "Users_BulkDelete",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteUsersRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteUsersRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteUsersRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteUsersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BulkOperationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkOperationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkOperationResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/users/bulk-update-roles": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Changes the role of several users; reports per-user results.",
        "operationId": "Users_BulkUpdateRoles",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdateUserRolesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdateUserRolesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdateUserRolesRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdateUserRolesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BulkOperationResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkOperationResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkOperationResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/users/{userId}/custom-role": {
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Assigns a custom dashboard role to a member, or clears it (`customRoleId` null: back to the built-in role). Administrator only;\nProfessional and Enterprise plans; custom roles must be enabled for the organization. The role REPLACES the member's built-in permissions.",
        "operationId": "Users_AssignCustomRole",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignCustomRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignCustomRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignCustomRoleRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignCustomRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRequiredResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/users/{userId}/status": {
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Sets a member's status to `Active` or `Suspended`.",
        "operationId": "Users_SetStatus",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMemberStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMemberStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetMemberStatusRequest"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/SetMemberStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/users/{userId}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Removes a user from the organization.",
        "operationId": "Users_Remove",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ],
        "x-restward-minimum-role": "Administrator"
      }
    },
    "/api/v1/organizations/{orgId}/workflows": {
      "get": {
        "tags": [
          "Provisioning workflows"
        ],
        "summary": "Lists the organization's provisioning workflow executions.",
        "operationId": "Workflows_List",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowExecutionDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowExecutionDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowExecutionDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/workflows/{workflowId}/cancel": {
      "post": {
        "tags": [
          "Provisioning workflows"
        ],
        "summary": "Cancels a running workflow.",
        "operationId": "Workflows_Cancel",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/v1/organizations/{orgId}/workflows/{workflowId}/retry": {
      "post": {
        "tags": [
          "Provisioning workflows"
        ],
        "summary": "Retries a failed workflow.",
        "operationId": "Workflows_Retry",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "workflowId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired bearer token."
          },
          "403": {
            "description": "The caller's role or organization does not allow this operation."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AbortRequest": {
        "required": [
          "detail"
        ],
        "type": "object",
        "properties": {
          "detail": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ActiveAlertDto": {
        "required": [
          "alertName",
          "severity",
          "startsAt",
          "summary"
        ],
        "type": "object",
        "properties": {
          "alertName": {
            "type": "string"
          },
          "severity": {
            "type": "string"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "ActivityEventDto": {
        "required": [
          "id",
          "category",
          "message",
          "detail",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "category": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ActivityFeedResponse": {
        "required": [
          "events"
        ],
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityEventDto"
            }
          }
        }
      },
      "AddDomainRequest": {
        "required": [
          "domain"
        ],
        "type": "object",
        "properties": {
          "domain": {
            "type": "string"
          }
        }
      },
      "AdoptComputeResourceRequest": {
        "required": [
          "name",
          "host",
          "port",
          "labels"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "labels": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "AdoptComputeResourceResponse": {
        "required": [
          "resource",
          "managementPublicKey",
          "managementPublicKeyFingerprint"
        ],
        "type": "object",
        "properties": {
          "resource": {
            "$ref": "#/components/schemas/ComputeResourceDto"
          },
          "managementPublicKey": {
            "type": "string"
          },
          "managementPublicKeyFingerprint": {
            "type": "string"
          }
        }
      },
      "AlertsResultDto": {
        "required": [
          "status",
          "fetchedAt",
          "alerts"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time"
          },
          "alerts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActiveAlertDto"
            }
          }
        }
      },
      "ApiBranding": {
        "required": [
          "logoUrl",
          "primaryColor",
          "customCss"
        ],
        "type": "object",
        "properties": {
          "logoUrl": {
            "type": "string"
          },
          "primaryColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "customCss": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiConfigurationDetailDto": {
        "required": [
          "id",
          "organizationId",
          "databaseConnectionId",
          "name",
          "slug",
          "includedSchemas",
          "excludedTables",
          "scalingTier",
          "kubernetesNamespace",
          "endpoint",
          "status",
          "branding"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "databaseConnectionId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "includedSchemas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludedTables": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "scalingTier": {
            "$ref": "#/components/schemas/ScalingTier"
          },
          "kubernetesNamespace": {
            "type": [
              "null",
              "string"
            ]
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApiStatus"
          },
          "branding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ApiBranding"
              }
            ]
          },
          "schemaRefreshIntervalMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "refreshRequestVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64",
            "default": 0
          },
          "refreshCompletedVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64",
            "default": 0
          },
          "lastRefreshRequestedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastRefreshCompletedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "routeGeneration": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64",
            "default": 0
          },
          "failureReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiConfigurationDto": {
        "required": [
          "id",
          "organizationId",
          "databaseConnectionId",
          "name",
          "slug",
          "scalingTier",
          "endpoint",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "databaseConnectionId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "scalingTier": {
            "$ref": "#/components/schemas/ScalingTier"
          },
          "endpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ApiStatus"
          },
          "failureReason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiKeyDto": {
        "required": [
          "id",
          "apiConfigurationId",
          "name",
          "keyPrefix",
          "role",
          "rateLimitPerMinute",
          "expiresAt",
          "isRevoked"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "apiConfigurationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/ApiKeyRole"
          },
          "rateLimitPerMinute": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isRevoked": {
            "type": "boolean"
          },
          "allowedIpRanges": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "customRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ApiKeyRole": {
        "type": "integer"
      },
      "ApiRefreshStatus": {
        "required": [
          "requestVersion",
          "completedVersion",
          "lastRefreshRequestedAt",
          "lastRefreshCompletedAt",
          "routeGeneration"
        ],
        "type": "object",
        "properties": {
          "requestVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "completedVersion": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "lastRefreshRequestedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastRefreshCompletedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "routeGeneration": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ApiStatus": {
        "type": "integer"
      },
      "ApiUsageDto": {
        "required": [
          "from",
          "to",
          "requestCount30d",
          "requestBytesIn30d",
          "responseBytesOut30d",
          "daily"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "requestCount30d": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "requestBytesIn30d": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "responseBytesOut30d": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "daily": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiUsagePointDto"
            }
          }
        }
      },
      "ApiUsagePointDto": {
        "required": [
          "day",
          "requests",
          "requestBytesIn",
          "responseBytesOut"
        ],
        "type": "object",
        "properties": {
          "day": {
            "type": "string",
            "format": "date"
          },
          "requests": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "requestBytesIn": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "responseBytesOut": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "ApproveMemberRequest": {
        "required": [
          "role"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AssignApiKeyCustomRoleRequest": {
        "required": [
          "customRoleId"
        ],
        "type": "object",
        "properties": {
          "customRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AssignCustomRoleRequest": {
        "required": [
          "customRoleId"
        ],
        "type": "object",
        "properties": {
          "customRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AuditLogEntryDto": {
        "required": [
          "id",
          "timestamp",
          "level",
          "category",
          "message",
          "latency",
          "organizationId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "level": {
            "$ref": "#/components/schemas/AuditLogLevel"
          },
          "category": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "latency": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "organizationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "AuditLogLevel": {
        "type": "integer"
      },
      "AuthMethodDto": {
        "required": [
          "id",
          "method",
          "isEnabled",
          "name",
          "description",
          "iconName",
          "bgColor",
          "iconColor"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "method": {
            "$ref": "#/components/schemas/AuthMethodType"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "iconName": {
            "type": "string"
          },
          "bgColor": {
            "type": "string"
          },
          "iconColor": {
            "type": "string"
          }
        }
      },
      "AuthMethodType": {
        "type": "integer"
      },
      "BillingInterval": {
        "type": "integer"
      },
      "BillingMode": {
        "type": "integer"
      },
      "BillingStatusDto": {
        "required": [
          "billingConfigured"
        ],
        "type": "object",
        "properties": {
          "billingConfigured": {
            "type": "boolean"
          }
        }
      },
      "BrowseDatabasesRequest": {
        "required": [
          "provider",
          "host",
          "port",
          "username",
          "password",
          "useSsl"
        ],
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "useSsl": {
            "type": "boolean"
          }
        }
      },
      "BulkDeleteUsersRequest": {
        "required": [
          "userIds"
        ],
        "type": "object",
        "properties": {
          "userIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "BulkOperationResult": {
        "required": [
          "successCount",
          "failedCount",
          "errors"
        ],
        "type": "object",
        "properties": {
          "successCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "failedCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BulkUpdateUserRolesRequest": {
        "required": [
          "updates"
        ],
        "type": "object",
        "properties": {
          "updates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserRoleUpdateDto"
            }
          }
        }
      },
      "ChangeInvoiceSubscriptionRequest": {
        "required": [
          "organizationId",
          "plan",
          "interval"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "plan": {
            "type": "string"
          },
          "interval": {
            "type": "string"
          },
          "contractReference": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ChangeManualLicenseRequest": {
        "required": [
          "organizationId",
          "plan"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "plan": {
            "type": "string"
          },
          "periodEnd": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reference": {
            "type": [
              "null",
              "string"
            ]
          },
          "extraHostedRuntimes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ChangePasswordRequest": {
        "required": [
          "currentPassword",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "currentPassword": {
            "type": "string"
          },
          "newPassword": {
            "type": "string"
          }
        }
      },
      "ChangePlanRequest": {
        "required": [
          "plan"
        ],
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          }
        }
      },
      "CheckoutRequest": {
        "required": [
          "plan",
          "successUrl",
          "cancelUrl"
        ],
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          },
          "successUrl": {
            "type": "string"
          },
          "cancelUrl": {
            "type": "string"
          },
          "interval": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CheckoutSessionResponse": {
        "required": [
          "sessionId",
          "url"
        ],
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "description": "Stripe session id."
          },
          "url": {
            "type": "string",
            "description": "Hosted Checkout URL."
          }
        },
        "description": "A Stripe Checkout session to redirect the user to."
      },
      "CliAuthorizeRequest": {
        "required": [
          "codeChallenge",
          "port",
          "hostname"
        ],
        "type": "object",
        "properties": {
          "codeChallenge": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hostname": {
            "type": "string"
          }
        },
        "description": "#457: the PKCE S256 challenge (base64url of a 32-byte SHA-256 digest) plus the loopback callback the\ncode may be exchanged from."
      },
      "CliAuthorizeResponse": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          }
        }
      },
      "CliTokenRequest": {
        "required": [
          "code",
          "codeVerifier",
          "port",
          "hostname"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "codeVerifier": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hostname": {
            "type": "string"
          }
        },
        "description": "#457: the single-use authorization code, the PKCE verifier, and the loopback callback it was bound to."
      },
      "ColumnMetadata": {
        "required": [
          "name",
          "dataType",
          "isNullable",
          "maxLength",
          "isPrimaryKey",
          "isAutoIncrement"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "dataType": {
            "type": "string"
          },
          "isNullable": {
            "type": "boolean"
          },
          "maxLength": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isPrimaryKey": {
            "type": "boolean"
          },
          "isAutoIncrement": {
            "type": "boolean"
          }
        }
      },
      "CompletePasskeyRegistrationRequest": {
        "required": [
          "challengeId",
          "attestationResponseJson",
          "name"
        ],
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "string",
            "format": "uuid"
          },
          "attestationResponseJson": {
            "type": "string"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ComputeResourceAcceptedResponse": {
        "required": [
          "id",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The new compute resource's id.",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "description": "Lifecycle status right after registration."
          }
        },
        "description": "A compute resource was registered and provisioning has started."
      },
      "ComputeResourceDto": {
        "required": [
          "id",
          "name",
          "host",
          "sshPort",
          "status",
          "failureReason",
          "manifest",
          "labels",
          "workflowId",
          "lastProvisioningRun",
          "bootstrapCredentialConsumed",
          "hostKeyFingerprint",
          "progress",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "sshPort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "failureReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "manifest": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HostManifest"
              }
            ]
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "workflowId": {
            "type": "string"
          },
          "lastProvisioningRun": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "bootstrapCredentialConsumed": {
            "type": "boolean"
          },
          "hostKeyFingerprint": {
            "type": [
              "null",
              "string"
            ]
          },
          "progress": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ComputeResourceProgressDto"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ComputeResourceProgressDto": {
        "required": [
          "currentStep",
          "attempt",
          "lastScriptStep",
          "lastScriptLine",
          "lastMarkerAt"
        ],
        "type": "object",
        "properties": {
          "currentStep": {
            "type": "string"
          },
          "attempt": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastScriptStep": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastScriptLine": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastMarkerAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ComputeResourceSummaryDto": {
        "required": [
          "id",
          "name",
          "host",
          "sshPort",
          "status",
          "hasManifest",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "sshPort": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "hasManifest": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ConfirmOrganizationDeletionRequest": {
        "required": [
          "token"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "ConnectionMode": {
        "type": "integer"
      },
      "ConnectionStatus": {
        "type": "integer"
      },
      "ConnectionTestResponse": {
        "required": [
          "connected",
          "reason"
        ],
        "type": "object",
        "properties": {
          "connected": {
            "type": "boolean",
            "description": "Whether the database accepted the connection."
          },
          "reason": {
            "type": [
              "null",
              "string"
            ],
            "description": "Why the connection failed; null on success."
          }
        },
        "description": "Outcome of a database connection test. A failed test is a 200 with `connected: false`."
      },
      "CpuInfo": {
        "required": [
          "cores",
          "model"
        ],
        "type": "object",
        "properties": {
          "cores": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "model": {
            "type": "string"
          }
        }
      },
      "CreateApiConfigurationRequest": {
        "required": [
          "name",
          "slug",
          "databaseConnectionId",
          "includedSchemas"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "databaseConnectionId": {
            "type": "string",
            "format": "uuid"
          },
          "includedSchemas": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scalingTier": {
            "$ref": "#/components/schemas/ScalingTier"
          },
          "excludedTables": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateApiKeyRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/ApiKeyRole"
          },
          "rateLimitPerMinute": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 60
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "allowedIpRanges": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateApiKeyResponse": {
        "required": [
          "id",
          "name",
          "keyPrefix",
          "plainTextKey",
          "role"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string"
          },
          "plainTextKey": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/ApiKeyRole"
          },
          "allowedIpRanges": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateDatabaseConnectionRequest": {
        "required": [
          "name",
          "provider",
          "host",
          "port",
          "databaseName",
          "username",
          "password"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/DatabaseProvider"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "databaseName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "connectionMode": {
            "$ref": "#/components/schemas/ConnectionMode"
          },
          "useSsl": {
            "type": "boolean",
            "default": true
          },
          "serverCertificate": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientWallet": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateDocumentationExampleRequest": {
        "required": [
          "endpointPath",
          "method",
          "requestExample",
          "responseExample",
          "description"
        ],
        "type": "object",
        "properties": {
          "endpointPath": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "requestExample": {
            "type": [
              "null",
              "string"
            ]
          },
          "responseExample": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateDocumentationPageRequest": {
        "required": [
          "title",
          "slug",
          "content",
          "contentType",
          "section",
          "sortOrder"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "contentType": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DocumentationContentType"
              }
            ]
          },
          "section": {
            "type": [
              "null",
              "string"
            ]
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "CreateEndpointRequest": {
        "required": [
          "apiConfigurationId",
          "method",
          "path",
          "sourceTable",
          "sourceSchema",
          "description",
          "authType",
          "rateLimitPerMinute",
          "cacheTtlSeconds"
        ],
        "type": "object",
        "properties": {
          "apiConfigurationId": {
            "type": "string",
            "format": "uuid"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "sourceTable": {
            "type": "string"
          },
          "sourceSchema": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "authType": {
            "type": [
              "null",
              "string"
            ]
          },
          "rateLimitPerMinute": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cacheTtlSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "CreateInvitationRequest": {
        "required": [
          "email",
          "role"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateInvoiceSubscriptionRequest": {
        "required": [
          "organizationId",
          "plan",
          "interval",
          "periodStart",
          "periodEnd"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "plan": {
            "type": "string"
          },
          "interval": {
            "type": "string"
          },
          "periodStart": {
            "type": "string",
            "format": "date-time"
          },
          "periodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "contractReference": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateOrganizationRequest": {
        "required": [
          "name",
          "slug"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "CreateRoleRequest": {
        "required": [
          "name",
          "color",
          "description"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/RoleKind"
          },
          "apiConfigurationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateScimTokenRequest": {
        "required": [
          "description",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "CreateScimTokenResponse": {
        "required": [
          "token",
          "metadata",
          "scimBaseUrl"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/ScimTokenDto"
          },
          "scimBaseUrl": {
            "type": "string"
          }
        }
      },
      "CreateTenantRequest": {
        "required": [
          "name",
          "slug",
          "plan"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "parentOrganizationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CustomRolesSettingsDto": {
        "required": [
          "enabled",
          "includedInPlan"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "includedInPlan": {
            "type": "boolean"
          }
        }
      },
      "DashboardMetricsDto": {
        "required": [
          "totalRequests30d",
          "totalRequestsTrend",
          "activeApis",
          "activeApisTrend",
          "avgLatencyMs",
          "avgLatencyTrend",
          "errorRate",
          "errorRateTrend"
        ],
        "type": "object",
        "properties": {
          "totalRequests30d": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "totalRequestsTrend": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          "activeApis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "activeApisTrend": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          "avgLatencyMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "avgLatencyTrend": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          },
          "errorRate": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          },
          "errorRateTrend": {
            "type": "array",
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
              "type": [
                "number",
                "string"
              ],
              "format": "double"
            }
          }
        }
      },
      "DatabaseConnectionDto": {
        "required": [
          "id",
          "organizationId",
          "name",
          "provider",
          "host",
          "port",
          "databaseName",
          "connectionMode",
          "useSsl",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/DatabaseProvider"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "databaseName": {
            "type": "string"
          },
          "connectionMode": {
            "$ref": "#/components/schemas/ConnectionMode"
          },
          "useSsl": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionStatus"
          },
          "tableCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "lastSyncedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "username": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasServerCertificate": {
            "type": "boolean",
            "default": false
          },
          "hasClientWallet": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "DatabaseConnectionWithCredentialsDto": {
        "required": [
          "id",
          "organizationId",
          "name",
          "provider",
          "host",
          "port",
          "databaseName",
          "username",
          "password",
          "connectionMode",
          "useSsl",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/DatabaseProvider"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "databaseName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "connectionMode": {
            "$ref": "#/components/schemas/ConnectionMode"
          },
          "useSsl": {
            "type": "boolean"
          },
          "status": {
            "$ref": "#/components/schemas/ConnectionStatus"
          },
          "hasServerCertificate": {
            "type": "boolean",
            "default": false
          },
          "hasClientWallet": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "DatabaseProvider": {
        "type": "integer"
      },
      "DatabasesResponse": {
        "required": [
          "databases"
        ],
        "type": "object",
        "properties": {
          "databases": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Database names."
          }
        },
        "description": "Databases visible on a database server."
      },
      "DecommissionResponse": {
        "required": [
          "id",
          "status",
          "decommissionedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "decommissionedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "DeleteApiAcceptedResponse": {
        "required": [
          "status",
          "workflowId"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "workflowId": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "description": "An accepted API delete: the runtime teardown is asynchronous; the API is Archived when it ends."
      },
      "DeletionPhase": {
        "type": "integer"
      },
      "DeploymentMode": {
        "type": "integer"
      },
      "DiskInfo": {
        "required": [
          "path",
          "total_bytes",
          "available_bytes"
        ],
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "total_bytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "available_bytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "DistroInfo": {
        "required": [
          "id",
          "version",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "DockerInfo": {
        "required": [
          "version",
          "channel",
          "socket"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "socket": {
            "type": "string"
          }
        }
      },
      "DocumentationConfigDto": {
        "required": [
          "id",
          "title",
          "description",
          "logoUrl",
          "customDomain",
          "primaryColor",
          "footerText",
          "isPublished",
          "sections"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "logoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "customDomain": {
            "type": [
              "null",
              "string"
            ]
          },
          "primaryColor": {
            "type": "string"
          },
          "footerText": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentationSectionDto"
            }
          },
          "verifiedCustomDomain": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DocumentationContentType": {
        "type": "integer"
      },
      "DocumentationExampleDto": {
        "required": [
          "id",
          "organizationId",
          "endpointPath",
          "method",
          "requestExample",
          "responseExample",
          "description"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "endpointPath": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "requestExample": {
            "type": [
              "null",
              "string"
            ]
          },
          "responseExample": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "DocumentationPageDto": {
        "required": [
          "id",
          "organizationId",
          "title",
          "slug",
          "content",
          "contentType",
          "section",
          "sortOrder",
          "isPublished"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "section": {
            "type": [
              "null",
              "string"
            ]
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isPublished": {
            "type": "boolean"
          }
        }
      },
      "DocumentationSectionDto": {
        "required": [
          "title",
          "pageCount"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "pageCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "DomainVerificationInstructionsDto": {
        "required": [
          "recordHost",
          "recordType",
          "expectedValue",
          "verified"
        ],
        "type": "object",
        "properties": {
          "recordHost": {
            "type": "string"
          },
          "recordType": {
            "type": "string"
          },
          "expectedValue": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          }
        }
      },
      "EgressAddressesDto": {
        "required": [
          "addresses"
        ],
        "type": "object",
        "properties": {
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EgressAddressObservationDto"
            }
          }
        }
      },
      "EgressAddressObservationDto": {
        "required": [
          "address",
          "source",
          "observedAt"
        ],
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EmailVerificationStatusDto": {
        "required": [
          "emailVerified",
          "verificationRequired"
        ],
        "type": "object",
        "properties": {
          "emailVerified": {
            "type": "boolean"
          },
          "verificationRequired": {
            "type": "boolean"
          }
        }
      },
      "EndpointAuthType": {
        "type": "integer"
      },
      "EndpointConfigurationDto": {
        "required": [
          "id",
          "apiConfigurationId",
          "method",
          "path",
          "sourceTable",
          "sourceSchema",
          "description",
          "authType",
          "rateLimitPerMinute",
          "cacheTtlSeconds",
          "isEnabled",
          "isCustom",
          "sortOrder"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "apiConfigurationId": {
            "type": "string",
            "format": "uuid"
          },
          "method": {
            "$ref": "#/components/schemas/EndpointHttpMethod"
          },
          "path": {
            "type": "string"
          },
          "sourceTable": {
            "type": "string"
          },
          "sourceSchema": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "authType": {
            "$ref": "#/components/schemas/EndpointAuthType"
          },
          "rateLimitPerMinute": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cacheTtlSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isEnabled": {
            "type": "boolean"
          },
          "isCustom": {
            "type": "boolean"
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "EndpointHttpMethod": {
        "type": "integer"
      },
      "EntitlementsDto": {
        "required": [
          "planKey",
          "planDisplayName",
          "providerPlan",
          "maxConnections",
          "maxApis",
          "maxSeats",
          "maxKeysPerApi",
          "maxKeyRateLimitPerMinute",
          "ssoIncluded",
          "scimIncluded",
          "currentConnections",
          "currentApis",
          "currentSeats",
          "licenseState",
          "trialEndsAt",
          "graceEndsAt",
          "lockedAt",
          "licenseEndsAt"
        ],
        "type": "object",
        "properties": {
          "planKey": {
            "type": "string"
          },
          "planDisplayName": {
            "type": "string"
          },
          "providerPlan": {
            "type": [
              "null",
              "string"
            ]
          },
          "maxConnections": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxApis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxSeats": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxKeysPerApi": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maxKeyRateLimitPerMinute": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "ssoIncluded": {
            "type": "boolean"
          },
          "scimIncluded": {
            "type": "boolean"
          },
          "currentConnections": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currentApis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "currentSeats": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "licenseState": {
            "type": "string"
          },
          "trialEndsAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "graceEndsAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lockedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "licenseEndsAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "customRolesIncluded": {
            "type": "boolean",
            "default": false
          },
          "paymentIssue": {
            "type": "boolean",
            "default": false
          },
          "paymentReadOnlyFrom": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "licenseGoverned": {
            "type": "boolean",
            "default": true
          },
          "maxHostedRuntimes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 2147483647
          },
          "currentHostedRuntimes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          },
          "metricsExportIncluded": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "EntityTagHeaderValue": {
        "type": "object",
        "properties": {
          "tag": {
            "$ref": "#/components/schemas/StringSegment"
          },
          "isWeak": {
            "type": "boolean"
          }
        }
      },
      "ErrorResponse": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable reason."
          }
        },
        "description": "The error body of every non-2xx answer: `{ \"error\": \"...\" }`. 402, 403 (SSO required) and 429 bodies add fields."
      },
      "ExtendTrialRequest": {
        "type": "object",
        "properties": {
          "days": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "endsAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "FileResult": {
        "type": "object",
        "properties": {
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          },
          "fileDownloadName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastModified": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "entityTag": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EntityTagHeaderValue"
              }
            ]
          },
          "enableRangeProcessing": {
            "type": "boolean"
          }
        }
      },
      "ForeignKeyMetadata": {
        "required": [
          "constraintName",
          "column",
          "referencedTable",
          "referencedColumn"
        ],
        "type": "object",
        "properties": {
          "constraintName": {
            "type": "string"
          },
          "column": {
            "type": "string"
          },
          "referencedTable": {
            "type": "string"
          },
          "referencedColumn": {
            "type": "string"
          }
        }
      },
      "ForgotPasswordRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          }
        }
      },
      "GdprExportStartedDto": {
        "required": [
          "exportId"
        ],
        "type": "object",
        "properties": {
          "exportId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "GdprExportStatusDto": {
        "required": [
          "id",
          "status",
          "requestedAt",
          "readyAt",
          "expiresAt",
          "fileSizeBytes",
          "downloadCount",
          "requestedByCurrentUser",
          "canDownload"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "requestedAt": {
            "type": "string",
            "format": "date-time"
          },
          "readyAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "fileSizeBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "downloadCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requestedByCurrentUser": {
            "type": "boolean"
          },
          "canDownload": {
            "type": "boolean"
          }
        }
      },
      "GrantManualLicenseRequest": {
        "required": [
          "organizationId",
          "plan"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "plan": {
            "type": "string"
          },
          "periodEnd": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "reference": {
            "type": [
              "null",
              "string"
            ]
          },
          "extraHostedRuntimes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          }
        }
      },
      "HostManifest": {
        "required": [
          "manifest_version",
          "generated_at",
          "hostname",
          "distro",
          "cpu",
          "memory",
          "disk",
          "docker",
          "management",
          "labels",
          "setup"
        ],
        "type": "object",
        "properties": {
          "manifest_version": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "hostname": {
            "type": "string"
          },
          "distro": {
            "$ref": "#/components/schemas/DistroInfo"
          },
          "cpu": {
            "$ref": "#/components/schemas/CpuInfo"
          },
          "memory": {
            "$ref": "#/components/schemas/MemoryInfo"
          },
          "disk": {
            "$ref": "#/components/schemas/DiskInfo"
          },
          "docker": {
            "$ref": "#/components/schemas/DockerInfo"
          },
          "management": {
            "$ref": "#/components/schemas/ManagementInfo"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "setup": {
            "$ref": "#/components/schemas/SetupInfo"
          }
        }
      },
      "IdResponse": {
        "required": [
          "id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The new resource's id.",
            "format": "uuid"
          }
        },
        "description": "Identifier of the resource that was just created."
      },
      "InvitationDto": {
        "required": [
          "id",
          "email",
          "role",
          "status",
          "expiresAt",
          "createdAt",
          "token"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "token": {
            "type": "string"
          }
        }
      },
      "InvoiceDto": {
        "required": [
          "id",
          "subscriptionId",
          "amountCents",
          "currency",
          "status",
          "paidAt",
          "failureReason",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "subscriptionId": {
            "type": "string",
            "format": "uuid"
          },
          "amountCents": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "paidAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "failureReason": {
            "type": [
              "null",
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "number": {
            "type": [
              "null",
              "string"
            ]
          },
          "hostedInvoiceUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "invoicePdfUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "invoiceDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "periodStart": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "periodEnd": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "InvoiceStatus": {
        "type": "integer"
      },
      "LoginRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "LogoutRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ManagementInfo": {
        "required": [
          "user",
          "public_key_fingerprint"
        ],
        "type": "object",
        "properties": {
          "user": {
            "type": "string"
          },
          "public_key_fingerprint": {
            "type": "string"
          }
        }
      },
      "MembershipDto": {
        "required": [
          "organizationId",
          "organizationName",
          "role",
          "status"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationName": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "MembershipInfo": {
        "required": [
          "organizationId",
          "organizationName",
          "role",
          "status"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationName": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "MemoryInfo": {
        "required": [
          "total_bytes"
        ],
        "type": "object",
        "properties": {
          "total_bytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "MetricPointDto": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "format": "date-time"
          },
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "MetricsCatalogEntryDto": {
        "required": [
          "id",
          "title",
          "unit",
          "kind",
          "labels",
          "windows"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "windows": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MetricSeriesDto": {
        "required": [
          "name",
          "labels",
          "points"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricPointDto"
            }
          }
        }
      },
      "MetricsExportConfigurationDto": {
        "required": [
          "id",
          "targetUrl",
          "format",
          "headers",
          "enabled",
          "isFailing",
          "consecutiveFailures",
          "lastError",
          "lastFailureAt",
          "lastSuccessAt",
          "failingSince",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "targetUrl": {
            "type": "string"
          },
          "format": {
            "type": "string"
          },
          "headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsExportHeaderDto"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "isFailing": {
            "type": "boolean"
          },
          "consecutiveFailures": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "lastError": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastFailureAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "lastSuccessAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "failingSince": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MetricsExportFormat": {
        "type": "integer"
      },
      "MetricsExportHeaderDto": {
        "required": [
          "name",
          "maskedValue"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "maskedValue": {
            "type": "string"
          }
        }
      },
      "MetricsExportStatusDto": {
        "required": [
          "config"
        ],
        "type": "object",
        "properties": {
          "config": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MetricsExportConfigurationDto"
              }
            ]
          }
        }
      },
      "MetricsExportTestResultDto": {
        "required": [
          "success",
          "statusCode",
          "error",
          "durationMs"
        ],
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "statusCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          },
          "durationMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "MetricsQueryResultDto": {
        "required": [
          "queryId",
          "title",
          "unit",
          "window",
          "status",
          "fetchedAt",
          "series",
          "stats"
        ],
        "type": "object",
        "properties": {
          "queryId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "window": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time"
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricSeriesDto"
            }
          },
          "stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricStatDto"
            }
          }
        }
      },
      "MetricStatDto": {
        "required": [
          "name",
          "labels",
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "OrganizationDeletionStatusDto": {
        "required": [
          "organizationId",
          "status",
          "phase",
          "scheduledFor",
          "daysRemaining",
          "requestedAt"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/OrganizationStatus"
          },
          "phase": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeletionPhase"
              }
            ]
          },
          "scheduledFor": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "daysRemaining": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requestedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "OrganizationDomainDto": {
        "required": [
          "id",
          "domain",
          "verified",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "domain": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationDto": {
        "required": [
          "id",
          "name",
          "slug",
          "deploymentMode",
          "status",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "deploymentMode": {
            "$ref": "#/components/schemas/DeploymentMode"
          },
          "status": {
            "$ref": "#/components/schemas/OrganizationStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationMemberDto": {
        "required": [
          "id",
          "userId",
          "organizationId",
          "role",
          "status",
          "displayName",
          "email",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "isLastActiveAdmin": {
            "type": "boolean",
            "default": false
          },
          "emailVerified": {
            "type": "boolean",
            "default": false
          },
          "customRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "OrganizationStatsDto": {
        "required": [
          "totalConnections",
          "activeConnections",
          "totalApis",
          "activeApis",
          "inactiveApis",
          "totalUsers",
          "activeUsers",
          "totalApiKeys",
          "activeApiKeys",
          "totalEndpoints"
        ],
        "type": "object",
        "properties": {
          "totalConnections": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "activeConnections": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalApis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "activeApis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "inactiveApis": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalUsers": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "activeUsers": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalApiKeys": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "activeApiKeys": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalEndpoints": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "OrganizationStatus": {
        "type": "integer"
      },
      "OrgApiKeyDto": {
        "required": [
          "id",
          "name",
          "keyPrefix",
          "maskedKey",
          "apiName",
          "role",
          "rateLimitPerMinute",
          "isRevoked",
          "requestCount",
          "lastUsedAt",
          "expiresAt",
          "apiConfigurationId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string"
          },
          "maskedKey": {
            "type": "string"
          },
          "apiName": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/ApiKeyRole"
          },
          "rateLimitPerMinute": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isRevoked": {
            "type": "boolean"
          },
          "requestCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "lastUsedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "apiConfigurationId": {
            "type": "string",
            "format": "uuid"
          },
          "allowedIpRanges": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "customRoleId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "PagedResultOfApiConfigurationDto": {
        "required": [
          "items",
          "totalCount",
          "page",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiConfigurationDto"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          }
        }
      },
      "PagedResultOfDatabaseConnectionDto": {
        "required": [
          "items",
          "totalCount",
          "page",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DatabaseConnectionDto"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          }
        }
      },
      "PagedResultOfEndpointConfigurationDto": {
        "required": [
          "items",
          "totalCount",
          "page",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EndpointConfigurationDto"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          }
        }
      },
      "PagedResultOfInvoiceDto": {
        "required": [
          "items",
          "totalCount",
          "page",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceDto"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          }
        }
      },
      "PagedResultOfOrganizationMemberDto": {
        "required": [
          "items",
          "totalCount",
          "page",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationMemberDto"
            }
          },
          "totalCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "page": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "pageSize": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "totalPages": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "hasPreviousPage": {
            "type": "boolean"
          }
        }
      },
      "PaginatedResultOfAuditLogEntryDto": {
        "required": [
          "entries",
          "total"
        ],
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLogEntryDto"
            }
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "PasskeyCredentialDto": {
        "required": [
          "id",
          "name",
          "aaGuid",
          "transports",
          "isBackedUp",
          "createdAt",
          "lastUsedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "aaGuid": {
            "type": "string",
            "format": "uuid"
          },
          "transports": {
            "type": [
              "null",
              "string"
            ]
          },
          "isBackedUp": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "PasskeyLoginRequest": {
        "required": [
          "challengeId",
          "assertionResponseJson"
        ],
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "string",
            "format": "uuid"
          },
          "assertionResponseJson": {
            "type": "string"
          }
        }
      },
      "PasskeyOptionsResponse": {
        "required": [
          "challengeId",
          "optionsJson"
        ],
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "string",
            "format": "uuid"
          },
          "optionsJson": {
            "type": "string"
          }
        }
      },
      "PermissionDto": {
        "required": [
          "resource",
          "canRead",
          "canWrite",
          "canDelete"
        ],
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "canRead": {
            "type": "boolean"
          },
          "canWrite": {
            "type": "boolean"
          },
          "canDelete": {
            "type": "boolean"
          },
          "operations": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PermissionUpdateDto": {
        "required": [
          "resource",
          "canRead",
          "canWrite",
          "canDelete"
        ],
        "type": "object",
        "properties": {
          "resource": {
            "type": "string"
          },
          "canRead": {
            "type": "boolean"
          },
          "canWrite": {
            "type": "boolean"
          },
          "canDelete": {
            "type": "boolean"
          },
          "operations": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PlatformSettingsDto": {
        "required": [
          "id",
          "platformName",
          "baseApiUrl",
          "defaultPaginationLimit",
          "globalRateLimitPerMin",
          "perTenantRateLimitPerMin",
          "burstAllowance",
          "rateLimitWindowSeconds",
          "enforceHttps",
          "corsValidation",
          "ipAllowlistingEnabled"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "platformName": {
            "type": "string"
          },
          "baseApiUrl": {
            "type": "string"
          },
          "defaultPaginationLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "globalRateLimitPerMin": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "perTenantRateLimitPerMin": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "burstAllowance": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rateLimitWindowSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "enforceHttps": {
            "type": "boolean"
          },
          "corsValidation": {
            "type": "boolean"
          },
          "ipAllowlistingEnabled": {
            "type": "boolean"
          }
        }
      },
      "PortalRequest": {
        "required": [
          "returnUrl"
        ],
        "type": "object",
        "properties": {
          "returnUrl": {
            "type": "string"
          }
        }
      },
      "PortalSessionResponse": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Hosted billing-portal URL."
          }
        },
        "description": "A Stripe billing-portal session to redirect the user to."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PromoteUserRequest": {
        "required": [
          "reason"
        ],
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "PublishDocumentationRequest": {
        "required": [
          "publish"
        ],
        "type": "object",
        "properties": {
          "publish": {
            "type": "boolean"
          }
        }
      },
      "RefreshTokenRequest": {
        "required": [
          "refreshToken"
        ],
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string"
          }
        }
      },
      "RegenerateEndpointsRequest": {
        "required": [
          "apiConfigurationId"
        ],
        "type": "object",
        "properties": {
          "apiConfigurationId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "RegisterComputeResourceRequest": {
        "required": [
          "name",
          "host",
          "port",
          "labels",
          "bootstrapUsername",
          "bootstrapPassword",
          "bootstrapPrivateKey"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "labels": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "bootstrapUsername": {
            "type": "string"
          },
          "bootstrapPassword": {
            "type": [
              "null",
              "string"
            ]
          },
          "bootstrapPrivateKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RegisterRequest": {
        "required": [
          "email",
          "password",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "displayName": {
            "type": [
              "null",
              "string"
            ]
          },
          "invitationToken": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RenamePasskeyRequest": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "RequestOrganizationDeletionRequest": {
        "required": [
          "slug"
        ],
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          }
        }
      },
      "RequestVolumeDataPoint": {
        "required": [
          "label",
          "value"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "RequestVolumeDto": {
        "required": [
          "period",
          "data"
        ],
        "type": "object",
        "properties": {
          "period": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestVolumeDataPoint"
            }
          }
        }
      },
      "ResetPasswordRequest": {
        "required": [
          "token",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "newPassword": {
            "type": "string"
          }
        }
      },
      "RevokeManualLicenseRequest": {
        "required": [
          "organizationId"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "RoleDto": {
        "required": [
          "id",
          "name",
          "description",
          "color",
          "isSystem",
          "userCount",
          "permissions"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "color": {
            "type": "string"
          },
          "isSystem": {
            "type": "boolean"
          },
          "userCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionDto"
            }
          },
          "kind": {
            "type": "string",
            "default": "Dashboard"
          },
          "apiConfigurationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "RoleKind": {
        "type": "integer",
        "default": 0
      },
      "RotateApiKeyResult": {
        "required": [
          "id",
          "name",
          "key",
          "maskedKey"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "maskedKey": {
            "type": "string"
          }
        }
      },
      "ScalingTier": {
        "type": "integer"
      },
      "ScimGroupMappingDto": {
        "required": [
          "id",
          "scimGroupExternalId",
          "displayName",
          "mappedRole",
          "memberCount",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "scimGroupExternalId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "mappedRole": {
            "type": "string"
          },
          "memberCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ScimTokenDto": {
        "required": [
          "id",
          "prefix",
          "description",
          "createdAt",
          "expiresAt",
          "lastUsedAt",
          "revokedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "prefix": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastUsedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "revokedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "SessionFamilyDto": {
        "required": [
          "familyId",
          "startedAt",
          "lastRefreshedAt",
          "amr",
          "organizationId",
          "client"
        ],
        "type": "object",
        "properties": {
          "familyId": {
            "type": "string",
            "format": "uuid"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastRefreshedAt": {
            "type": "string",
            "format": "date-time"
          },
          "amr": {
            "type": [
              "null",
              "string"
            ]
          },
          "organizationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "client": {
            "type": [
              "null",
              "string"
            ]
          },
          "isCurrent": {
            "type": "boolean",
            "default": false
          },
          "accessValidUntil": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SetCustomRolesEnabledRequest": {
        "required": [
          "enabled"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "SetGroupRoleRequest": {
        "required": [
          "role"
        ],
        "type": "object",
        "properties": {
          "role": {
            "$ref": "#/components/schemas/UserRole"
          }
        }
      },
      "SetLabelsRequest": {
        "required": [
          "labels"
        ],
        "type": "object",
        "properties": {
          "labels": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "SetMemberStatusRequest": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "SetPaymentGraceRequest": {
        "type": "object",
        "properties": {
          "paymentGraceDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "SetupInfo": {
        "required": [
          "script",
          "version"
        ],
        "type": "object",
        "properties": {
          "script": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "SharedRuntimeMigrationAction": {
        "type": "integer"
      },
      "SharedRuntimeMigrationItem": {
        "required": [
          "apiConfigurationId",
          "organizationId",
          "name",
          "currentEndpoint",
          "hostname",
          "action",
          "error"
        ],
        "type": "object",
        "properties": {
          "apiConfigurationId": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "currentEndpoint": {
            "type": [
              "null",
              "string"
            ]
          },
          "hostname": {
            "type": [
              "null",
              "string"
            ]
          },
          "action": {
            "$ref": "#/components/schemas/SharedRuntimeMigrationAction"
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SharedRuntimeMigrationReport": {
        "required": [
          "dryRun",
          "runtimeHostAvailable",
          "apis"
        ],
        "type": "object",
        "properties": {
          "dryRun": {
            "type": "boolean"
          },
          "runtimeHostAvailable": {
            "type": "boolean"
          },
          "apis": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SharedRuntimeMigrationItem"
            }
          }
        }
      },
      "SsoChallengeRequest": {
        "required": [
          "orgSlug",
          "loginHint",
          "returnUrl"
        ],
        "type": "object",
        "properties": {
          "orgSlug": {
            "type": "string"
          },
          "loginHint": {
            "type": [
              "null",
              "string"
            ]
          },
          "returnUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SsoChallengeResponse": {
        "required": [
          "authorizeUrl"
        ],
        "type": "object",
        "properties": {
          "authorizeUrl": {
            "type": "string"
          }
        }
      },
      "SsoCompleteRequest": {
        "required": [
          "code",
          "state"
        ],
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "SsoConfigurationDto": {
        "required": [
          "id",
          "provider",
          "protocol",
          "authority",
          "idpTenantId",
          "clientId",
          "hasClientSecret",
          "enabled",
          "enforceSso",
          "requireSsoForCli",
          "jitProvisioningEnabled",
          "jitDefaultRole",
          "jitAutoActivate",
          "createdAt",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "authority": {
            "type": "string"
          },
          "idpTenantId": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "hasClientSecret": {
            "type": "boolean"
          },
          "enabled": {
            "type": "boolean"
          },
          "enforceSso": {
            "type": "boolean"
          },
          "requireSsoForCli": {
            "type": "boolean"
          },
          "jitProvisioningEnabled": {
            "type": "boolean"
          },
          "jitDefaultRole": {
            "type": "string"
          },
          "jitAutoActivate": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "SsoConfigurationStatusDto": {
        "required": [
          "config",
          "redirectUri"
        ],
        "type": "object",
        "properties": {
          "config": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SsoConfigurationDto"
              }
            ]
          },
          "redirectUri": {
            "type": "string"
          }
        }
      },
      "SsoDiscoverRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          }
        }
      },
      "SsoDiscoveryResponse": {
        "required": [
          "ssoAvailable",
          "orgSlug",
          "organizationName"
        ],
        "type": "object",
        "properties": {
          "ssoAvailable": {
            "type": "boolean"
          },
          "orgSlug": {
            "type": [
              "null",
              "string"
            ]
          },
          "organizationName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SsoLoginResult": {
        "required": [
          "tokens",
          "returnUrl"
        ],
        "type": "object",
        "properties": {
          "tokens": {
            "$ref": "#/components/schemas/TokenResponse"
          },
          "returnUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StringSegment": {
        "type": "object",
        "properties": {
          "buffer": {
            "type": [
              "null",
              "string"
            ]
          },
          "offset": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "length": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "value": {
            "type": [
              "null",
              "string"
            ]
          },
          "hasValue": {
            "type": "boolean"
          }
        }
      },
      "SubscriptionDto": {
        "required": [
          "id",
          "organizationId",
          "mode",
          "providerCustomerId",
          "providerSubscriptionId",
          "plan",
          "status",
          "interval",
          "contractReference",
          "cancelAtPeriodEnd",
          "currentPeriodStart",
          "currentPeriodEnd",
          "canceledAt",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid"
          },
          "mode": {
            "$ref": "#/components/schemas/BillingMode"
          },
          "providerCustomerId": {
            "type": [
              "null",
              "string"
            ]
          },
          "providerSubscriptionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "plan": {
            "$ref": "#/components/schemas/SubscriptionPlan"
          },
          "status": {
            "$ref": "#/components/schemas/SubscriptionStatus"
          },
          "interval": {
            "$ref": "#/components/schemas/BillingInterval"
          },
          "contractReference": {
            "type": [
              "null",
              "string"
            ]
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "currentPeriodStart": {
            "type": "string",
            "format": "date-time"
          },
          "currentPeriodEnd": {
            "type": "string",
            "format": "date-time"
          },
          "canceledAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "extraHostedRuntimes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32",
            "default": 0
          }
        }
      },
      "SubscriptionPlan": {
        "type": "integer"
      },
      "SubscriptionStatus": {
        "type": "integer"
      },
      "SwitchOrganizationRequest": {
        "required": [
          "organizationId"
        ],
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "SystemVersionResponse": {
        "required": [
          "version",
          "commit",
          "buildTime",
          "runtime"
        ],
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "description": "Release tag in deployed images (e.g. \"v1.4.0\", passed by the CD pipeline), or\n\"dev (local build)\" for local builds. Never a fake \"1.0.0\" or \"unknown\" when the build stamped one."
          },
          "commit": {
            "type": [
              "null",
              "string"
            ],
            "description": "Full git commit SHA the binary was built from (MSBuild `SourceRevisionId`), or\n`null` when the build had no git information (e.g. a source-only Docker build without build args)."
          },
          "buildTime": {
            "type": [
              "null",
              "string"
            ],
            "description": "UTC timestamp of when the binary was built, stamped at build time; `null` only if the\nstamp is missing or unparseable. Explicitly never the request time — the previous\nimplementation returned `DateTimeOffset.UtcNow`, which was meaningless (#274).",
            "format": "date-time"
          },
          "runtime": {
            "type": "string",
            "description": ".NET runtime description of the running process."
          }
        },
        "description": "Build identity of the running API, reported by `GET /api/v1/system/version` (#274, part 2).\nEvery value is stamped into the assembly at build time — nothing here reflects the request time."
      },
      "TableMetadata": {
        "required": [
          "schema",
          "name",
          "columns",
          "primaryKeyColumns",
          "foreignKeys"
        ],
        "type": "object",
        "properties": {
          "schema": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ColumnMetadata"
            }
          },
          "primaryKeyColumns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "foreignKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForeignKeyMetadata"
            }
          }
        }
      },
      "TablesDiscoveredResponse": {
        "required": [
          "tablesDiscovered"
        ],
        "type": "object",
        "properties": {
          "tablesDiscovered": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Number of tables and views found.",
            "format": "int32"
          }
        },
        "description": "Result of a schema sync."
      },
      "TablesResponse": {
        "required": [
          "tables"
        ],
        "type": "object",
        "properties": {
          "tables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TableMetadata"
            },
            "description": "Table metadata with columns."
          }
        },
        "description": "The tables and views of a connection's last schema sync."
      },
      "TenantDetailDto": {
        "required": [
          "id",
          "name",
          "slug",
          "status",
          "deploymentMode",
          "createdAt",
          "apiCount",
          "userCount",
          "connectionCount",
          "requestCount30d"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "deploymentMode": {
            "$ref": "#/components/schemas/DeploymentMode"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "apiCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "userCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "connectionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requestCount30d": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "TenantDto": {
        "required": [
          "id",
          "name",
          "slug",
          "status",
          "plan",
          "apiCount",
          "userCount",
          "requestCount30d",
          "billingMode",
          "billingInterval",
          "requestTrend"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "apiCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "userCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "requestCount30d": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "billingMode": {
            "type": [
              "null",
              "string"
            ]
          },
          "billingInterval": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestTrend": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          }
        }
      },
      "TenantMetricsCatalogDto": {
        "required": [
          "historyDays",
          "allowedWindows",
          "api",
          "organization"
        ],
        "type": "object",
        "properties": {
          "historyDays": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "allowedWindows": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "api": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsCatalogEntryDto"
            }
          },
          "organization": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsCatalogEntryDto"
            }
          }
        }
      },
      "TenantUsageDto": {
        "required": [
          "requestCount30d",
          "requestTrend",
          "storageBytes",
          "apiCount",
          "userCount",
          "connectionCount",
          "usageAccountingAvailable"
        ],
        "type": "object",
        "properties": {
          "requestCount30d": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "requestTrend": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int64"
            }
          },
          "storageBytes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int64"
          },
          "apiCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "userCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "connectionCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "usageAccountingAvailable": {
            "type": "boolean"
          }
        }
      },
      "TestApiRequestBody": {
        "required": [
          "method",
          "path",
          "headers",
          "body",
          "apiKey"
        ],
        "type": "object",
        "properties": {
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "headers": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "apiKey": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "TestApiRequestResponse": {
        "required": [
          "statusCode",
          "statusText",
          "headers",
          "body",
          "latencyMs"
        ],
        "type": "object",
        "properties": {
          "statusCode": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "statusText": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "body": {
            "type": "string"
          },
          "latencyMs": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int64"
          }
        }
      },
      "TestConnectionChangesRequest": {
        "required": [
          "name",
          "provider",
          "host",
          "port",
          "databaseName",
          "username",
          "password",
          "useSsl"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "databaseName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "useSsl": {
            "type": "boolean"
          },
          "connectionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "serverCertificate": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientWallet": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ToggleAuthMethodRequest": {
        "required": [
          "isEnabled"
        ],
        "type": "object",
        "properties": {
          "isEnabled": {
            "type": "boolean"
          }
        }
      },
      "TokenResponse": {
        "required": [
          "accessToken",
          "refreshToken",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "organizationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "memberships": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/MembershipInfo"
            }
          },
          "requiresOnboarding": {
            "type": "boolean",
            "default": false
          },
          "deviceToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "requiresPasswordChange": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "UpdateApiConfigurationRequest": {
        "required": [
          "name",
          "excludedTables",
          "scalingTier"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "excludedTables": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "scalingTier": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ScalingTier"
              }
            ]
          },
          "schemaRefreshIntervalMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "UpdateApiKeyAllowedIpsRequest": {
        "required": [
          "allowedIpRanges"
        ],
        "type": "object",
        "properties": {
          "allowedIpRanges": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateAuthMethodConfigurationRequest": {
        "required": [
          "configuration"
        ],
        "type": "object",
        "properties": {
          "configuration": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateConnectionRequest": {
        "required": [
          "name",
          "host",
          "port",
          "databaseName",
          "username",
          "password",
          "useSsl"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "port": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "databaseName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "useSsl": {
            "type": "boolean"
          },
          "serverCertificate": {
            "type": [
              "null",
              "string"
            ]
          },
          "clientWallet": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateDocumentationExampleRequest": {
        "required": [
          "endpointPath",
          "method",
          "requestExample",
          "responseExample",
          "description"
        ],
        "type": "object",
        "properties": {
          "endpointPath": {
            "type": [
              "null",
              "string"
            ]
          },
          "method": {
            "type": [
              "null",
              "string"
            ]
          },
          "requestExample": {
            "type": [
              "null",
              "string"
            ]
          },
          "responseExample": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateDocumentationPageRequest": {
        "required": [
          "title",
          "slug",
          "content",
          "contentType",
          "section",
          "sortOrder",
          "isPublished"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "slug": {
            "type": [
              "null",
              "string"
            ]
          },
          "content": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentType": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DocumentationContentType"
              }
            ]
          },
          "section": {
            "type": [
              "null",
              "string"
            ]
          },
          "sortOrder": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "isPublished": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpdateDocumentationRequest": {
        "required": [
          "title",
          "description",
          "logoUrl",
          "customDomain",
          "primaryColor",
          "footerText"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "logoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "customDomain": {
            "type": [
              "null",
              "string"
            ]
          },
          "primaryColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "footerText": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateEndpointRequest": {
        "required": [
          "description",
          "authType",
          "rateLimitPerMinute",
          "cacheTtlSeconds",
          "method",
          "path",
          "sourceTable"
        ],
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "authType": {
            "type": [
              "null",
              "string"
            ]
          },
          "rateLimitPerMinute": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "cacheTtlSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "method": {
            "type": [
              "null",
              "string"
            ]
          },
          "path": {
            "type": [
              "null",
              "string"
            ]
          },
          "sourceTable": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateOrganizationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "slug": {
            "type": [
              "null",
              "string"
            ]
          },
          "deploymentMode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeploymentMode"
              }
            ]
          },
          "parentOrganizationId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "removeParent": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "UpdatePermissionsRequest": {
        "required": [
          "permissions"
        ],
        "type": "object",
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionUpdateDto"
            }
          }
        }
      },
      "UpdateRoleRequest": {
        "required": [
          "name",
          "description",
          "color"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "color": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateSettingsRequest": {
        "required": [
          "platformName",
          "baseApiUrl",
          "defaultPaginationLimit",
          "globalRateLimitPerMin",
          "perTenantRateLimitPerMin",
          "burstAllowance",
          "rateLimitWindowSeconds",
          "enforceHttps",
          "corsValidation",
          "ipAllowlistingEnabled"
        ],
        "type": "object",
        "properties": {
          "platformName": {
            "type": [
              "null",
              "string"
            ]
          },
          "baseApiUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "defaultPaginationLimit": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "globalRateLimitPerMin": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "perTenantRateLimitPerMin": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "burstAllowance": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "rateLimitWindowSeconds": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "enforceHttps": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "corsValidation": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "ipAllowlistingEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "UpgradeRequiredResponse": {
        "required": [
          "error",
          "code",
          "limit",
          "current",
          "maximum",
          "upgradeUrl"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "limit": {
            "type": [
              "null",
              "string"
            ]
          },
          "current": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "maximum": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "upgradeUrl": {
            "type": "string"
          }
        },
        "description": "402 body (spec §5.5). The limit fields are omitted from JSON only when unknown."
      },
      "UpsertMetricsExportRequest": {
        "required": [
          "targetUrl",
          "format",
          "headers",
          "enabled",
          "confirmSlug"
        ],
        "type": "object",
        "properties": {
          "targetUrl": {
            "type": "string"
          },
          "format": {
            "$ref": "#/components/schemas/MetricsExportFormat"
          },
          "headers": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "confirmSlug": {
            "type": "string"
          }
        }
      },
      "UpsertSsoConfigurationRequest": {
        "required": [
          "idpTenantId",
          "clientId",
          "clientSecret",
          "enabled",
          "enforceSso",
          "requireSsoForCli",
          "jitProvisioningEnabled",
          "jitDefaultRole",
          "jitAutoActivate"
        ],
        "type": "object",
        "properties": {
          "idpTenantId": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "clientSecret": {
            "type": [
              "null",
              "string"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "enforceSso": {
            "type": "boolean"
          },
          "requireSsoForCli": {
            "type": "boolean"
          },
          "jitProvisioningEnabled": {
            "type": "boolean"
          },
          "jitDefaultRole": {
            "$ref": "#/components/schemas/UserRole"
          },
          "jitAutoActivate": {
            "type": "boolean"
          }
        }
      },
      "UserRole": {
        "type": "integer"
      },
      "UserRoleUpdateDto": {
        "required": [
          "userId",
          "newRole"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "newRole": {
            "$ref": "#/components/schemas/UserRole"
          }
        }
      },
      "VerifyEmailRequest": {
        "required": [
          "token"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WorkflowAcceptedResponse": {
        "required": [
          "workflowId"
        ],
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string",
            "description": "Temporal workflow id of the started operation."
          }
        },
        "description": "A long-running operation was started; follow it through the workflows endpoints."
      },
      "WorkflowExecutionDto": {
        "required": [
          "workflowId",
          "type",
          "status",
          "startedAt",
          "completedAt",
          "duration",
          "steps"
        ],
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "duration": {
            "type": [
              "null",
              "string"
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowStepDto"
            }
          }
        }
      },
      "WorkflowStatus": {
        "required": [
          "workflowId",
          "currentStep",
          "isRunning",
          "isCompleted",
          "hasFailed",
          "error"
        ],
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string"
          },
          "currentStep": {
            "type": "string"
          },
          "isRunning": {
            "type": "boolean"
          },
          "isCompleted": {
            "type": "boolean"
          },
          "hasFailed": {
            "type": "boolean"
          },
          "error": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WorkflowStepDto": {
        "required": [
          "name",
          "status",
          "duration"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "duration": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Access token from `POST /api/v1/auth/login` or `/auth/refresh`; carries the `org_id` and `role` claims.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "Sign in & tokens",
      "description": "Registration, sign-in, token refresh, password reset and switching organization."
    },
    {
      "name": "Passkeys",
      "description": "Register and manage passkeys (WebAuthn), and sign in with them."
    },
    {
      "name": "SSO sign-in",
      "description": "Discover the organization's identity provider and complete enterprise sign-on."
    },
    {
      "name": "Organizations",
      "description": "Create, look up, update and delete organizations."
    },
    {
      "name": "Members",
      "description": "List members and approve or reject join requests."
    },
    {
      "name": "Invitations",
      "description": "Invite people to the organization by email."
    },
    {
      "name": "Users",
      "description": "Manage the organization's users, their roles and status."
    },
    {
      "name": "Roles",
      "description": "Custom roles and the permissions they grant."
    },
    {
      "name": "GDPR reports",
      "description": "Request the organization's GDPR report (Art. 15 and 20), follow its progress and download it."
    },
    {
      "name": "My GDPR report",
      "description": "Request your own GDPR report (Art. 15 and 20): your data across all your organizations. Download it once it is ready."
    },
    {
      "name": "Database connections",
      "description": "Connect databases, test them and sync their schemas."
    },
    {
      "name": "Egress addresses",
      "description": "The platform's detected outbound addresses, to allow in your database firewall."
    },
    {
      "name": "APIs",
      "description": "Create and manage the REST APIs generated from a database connection."
    },
    {
      "name": "Endpoints",
      "description": "The tables and views a generated API exposes."
    },
    {
      "name": "API keys",
      "description": "Keys that authenticate calls to one generated API."
    },
    {
      "name": "Organization API keys",
      "description": "Organization-level keys with IP allowlisting, valid across the organization's APIs."
    },
    {
      "name": "API documentation",
      "description": "The pages and examples published with a generated API."
    },
    {
      "name": "Custom domains",
      "description": "Custom domains for generated APIs and their DNS verification."
    },
    {
      "name": "Billing",
      "description": "Subscription, plan, invoices and the customer portal."
    },
    {
      "name": "Sign-in methods",
      "description": "Enable, disable and configure the organization's sign-in methods."
    },
    {
      "name": "SSO configuration",
      "description": "Configure enterprise single sign-on for the organization."
    },
    {
      "name": "SCIM provisioning",
      "description": "SCIM tokens and group-to-role mappings for directory sync."
    },
    {
      "name": "Dashboard",
      "description": "Headline stats, request metrics and recent activity for the dashboard."
    },
    {
      "name": "Audit logs",
      "description": "The organization's audit trail. Administrator only."
    },
    {
      "name": "Provisioning workflows",
      "description": "Provisioning workflow executions: list, cancel and retry."
    },
    {
      "name": "Metrics export",
      "description": "Push the organization's API metrics to its own OTLP or Prometheus remote-write endpoint. Administrator only."
    },
    {
      "name": "API metrics",
      "description": "Your APIs' request rate, status classes, latency, rate-limit and auth outcomes over fixed windows, within your plan's history. Every organization member."
    },
    {
      "name": "Tenants",
      "description": "All tenant organizations and their usage. SystemAdmin only."
    },
    {
      "name": "Platform settings",
      "description": "Global platform settings and the system version. SystemAdmin only."
    },
    {
      "name": "Compute resources",
      "description": "Provision and manage the compute-resource fleet. SystemAdmin only."
    },
    {
      "name": "Runtime migration",
      "description": "Move the APIs still on the shared runtime to per-API runtimes. SystemAdmin only."
    },
    {
      "name": "Platform metrics",
      "description": "The platform pane: named metrics queries over fixed windows, and the active alerts. SystemAdmin only."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Authentication",
      "tags": [
        "Sign in & tokens",
        "Passkeys",
        "SSO sign-in"
      ]
    },
    {
      "name": "Organization & members",
      "tags": [
        "Organizations",
        "Members",
        "Invitations",
        "Users",
        "Roles",
        "GDPR reports",
        "My GDPR report"
      ]
    },
    {
      "name": "APIs",
      "tags": [
        "Database connections",
        "Egress addresses",
        "APIs",
        "Endpoints",
        "API keys",
        "Organization API keys",
        "API documentation",
        "Custom domains"
      ]
    },
    {
      "name": "Billing",
      "tags": [
        "Billing"
      ]
    },
    {
      "name": "SSO & SCIM admin",
      "tags": [
        "Sign-in methods",
        "SSO configuration",
        "SCIM provisioning"
      ]
    },
    {
      "name": "Monitoring & activity",
      "tags": [
        "Dashboard",
        "Audit logs",
        "Provisioning workflows",
        "Metrics export",
        "API metrics"
      ]
    },
    {
      "name": "SystemAdmin",
      "tags": [
        "Tenants",
        "Platform settings",
        "Compute resources",
        "Runtime migration",
        "Platform metrics"
      ]
    }
  ]
}